Package com.rackspacecloud.client.cloudfiles

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


      StringBuilder nameBuilder = new StringBuilder(createTempContainerName("long"));
      while(nameBuilder.length() <= FilesConstants.CONTAINER_NAME_LENGTH) {
        nameBuilder.append("a");
      }
      try {
        fc.createContainer(nameBuilder.toString());
        // Note, we shouldn't get here, but want to clean up if we do
        fc.deleteContainer(nameBuilder.toString());
        fail("No exception thrown");
      }
      catch (FilesInvalidNameException fine) {
View Full Code Here


     
      // Make sure it's not there
      assertFalse(client.containerExists(containerName));
     
      // Add it
      client.createContainer(containerName);
     
      // See that it's there
      assertTrue(client.containerExists(containerName));
     
      // Add a path and two files
View Full Code Here

     
      // Make sure it's not there
      assertFalse(client.containerExists(containerName));
     
      // Add it
      client.createContainer(containerName);
     
      // See that it's there
      assertTrue(client.containerExists(containerName));
     
      // Add a path and two files
View Full Code Here

     
      // Make sure it's not there
      assertFalse(client.containerExists(containerName));
     
      // Add it
      client.createContainer(containerName);
     
      // See that it's there
      assertTrue(client.containerExists(containerName));
     
      // Add a path and two files
View Full Code Here

      byte randomData[] = makeRandomBytes();
      FilesClient client = new FilesClient();
      assertTrue(client.login());
     
      // Set up
      client.createContainer(containerName);
     
      // Store it
      ByteArrayEntity entity = new ByteArrayEntity(randomData);
      entity.setContentType("test/content_type");
View Full Code Here

      FilesClient client = new FilesClient();
      // client.setUseETag(false);
      assertTrue(client.login());
     
      // Set up
      client.createContainer(containerName);
     
      // Store it
      for (int i=0; i < 10; i++) {
        assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", "testfile" + i + ".bogus", new HashMap<String,String>()));
      }
View Full Code Here

      byte randomData[] = makeRandomBytes();
      FilesClient client = new FilesClient();
      assertTrue(client.login());
     
      // Set up
      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>()));
View Full Code Here

      FilesClient client = new FilesClient();
      assertTrue(client.login());
     
      // Populate our  account
      for (int i=0; i < 20; i++) {
        client.createContainer("test_container_" + i);
      }
     
      // Make sure it's there
      List<FilesContainer> originalContainers = client.listContainers();
      assertTrue(20 <=originalContainers.size());
View Full Code Here

      FilesClient client = new FilesClient();
      // client.setUseETag(false);
      assertTrue(client.login());
     
      // 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));
     
View Full Code Here

      byte randomData[] = makeRandomBytes(1024 * 100); // 100 K to make sure it's interesting
      FilesClient client = new FilesClient();
      assertTrue(client.login());
     
      // Set up
      client.createContainer(containerName);
     
      // Store it
      assertNotNull(client.storeStreamedObject(containerName, new ByteArrayInputStream(randomData), "application/octet-stream", filename, new HashMap<String,String>()));
     
      // Make sure it's there
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.