Examples of listObjects()


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

      // Store it
      logger.info("About to save: " + filename);
      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);
      assertEquals(filename, obj.getName());
      assertEquals("application/octet-stream", obj.getMimeType());
      assertEquals(NUMBER_RANDOM_BYTES, obj.getSize());
View Full Code Here

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

     
      // 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);
      assertEquals(filename, obj.getName());
      assertEquals("application/octet-stream", obj.getMimeType());
     
View Full Code Here

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

     
      // 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);
      assertEquals(filename, obj.getName());
      assertEquals("application/octet-stream", obj.getMimeType());
     
View Full Code Here

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

     
      // Store it
      assertTrue(client.storeObject(containerName, randomData, "test/content_type", 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);
      assertEquals(filename, obj.getName());
      assertEquals("test/content_type", obj.getMimeType());
     
View Full Code Here

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

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

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

        assertEquals("testfile" + i + ".bogus", obj.getName());
        assertEquals("application/octet-stream", obj.getMimeType());
      }

      // Now do a limit
      objects = client.listObjects(containerName, 3);
      assertEquals(3, objects.size());
      for (int i=0; i < 3; i++) {
        FilesObject obj = objects.get(i);
        assertEquals("testfile" + i + ".bogus", obj.getName());
        assertEquals("application/octet-stream", obj.getMimeType());
View Full Code Here

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

        assertEquals("testfile" + i + ".bogus", obj.getName());
        assertEquals("application/octet-stream", obj.getMimeType());
      }
     
      // Now check out a marker
      objects = client.listObjects(containerName, 4, "testfile3.bogus");
      assertEquals(4, objects.size());
      for (int i=0; i < 4; i++) {
        FilesObject obj = objects.get(i);
        assertEquals("testfile" + (i + 4) + ".bogus", obj.getName());
        assertEquals("application/octet-stream", obj.getMimeType());
View Full Code Here

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

      // Make sure it all got written
      assertEquals(randomData.length, callback.bytesSent);
      assertEquals(randomData.length/8192 + 1, callback.nCalls);
     
      // Make sure it's there
      List<FilesObject> objects = client.listObjects(containerName);
      assertEquals(1, objects.size());
      FilesObject obj = objects.get(0);
      assertEquals(filename, obj.getName());
      assertEquals("application/octet-stream", obj.getMimeType());
     
View Full Code Here

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

    FilesClient client = new FilesClient();
    if ( client.login() )
    {
      if (client.containerExists(containerName))
      {
        List<FilesObject> objects = client.listObjects(containerName);
        for (FilesObject obj: objects)
        {
          System.out.println ("\t"+StringUtils.rightPad(obj.getName (), 35)+ obj.getSizeString());
          File localFile = new File ( FilenameUtils.concat(localFolder.getAbsolutePath(), obj.getName()) );
          obj.writeObjectToFile (localFile);
View Full Code Here

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

      // Store it
      logger.info("About to save: " + filename);
      assertNotNull(client.storeObjectAs(containerName, new File(fullPath), "application/octet-stream", filename));
     
      // Make sure it's there
      List<FilesObject> objects = client.listObjects(containerName);
      assertEquals(1, objects.size());
      FilesObject obj = objects.get(0);
      assertEquals(filename, obj.getName());
      assertEquals("application/octet-stream", obj.getMimeType());
     
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.