Package com.rackspacecloud.client.cloudfiles

Examples of com.rackspacecloud.client.cloudfiles.FilesClient.storeObject()


      client.createContainer(containerName);
     
      // Store it
      for (int i=0; i < 10; i++) {
        assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", "foo/testfile" + i + ".bogus", new HashMap<String,String>()));
        assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", "bar/testfile" + i + ".bogus", new HashMap<String,String>()));
      }
     
      // Make sure it's there
      List<FilesObject> objects = client.listObjects(containerName);
      assertEquals(20, objects.size());
View Full Code Here


      // Set up
      client.createContainer(containerName);
     
      // Store it
      TesterCallback callback = new TesterCallback();
      assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", filename, new HashMap<String,String>(), callback));
     
      // Make sure it all got written
      assertEquals(randomData.length, callback.bytesSent);
      assertEquals(randomData.length/8192 + 1, callback.nCalls);
     
View Full Code Here

     
      // Set up
      client.createContainer(containerName);
     
      // Store it
      assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", filename, new HashMap<String,String>()));
     
      // Make sure it's there
      List<FilesObject> objects = client.listObjects(containerName);
      assertEquals(1, objects.size());
      FilesObject obj = objects.get(0);
View Full Code Here

      // Set up
      client.createContainer(containerName);
      String cdnUrl = client.cdnEnableContainer(containerName);
     
      // Store it
      assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", filename, new HashMap<String,String>()));
     
      // Make sure it's there
      List<FilesObject> objects = client.listObjects(containerName);
     
      // See that the CDN URL works
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.