Package com.rackspacecloud.client.cloudfiles

Examples of com.rackspacecloud.client.cloudfiles.FilesAccountInfo


    // -- "head <container name>" - show container info 
    // -- "head <object name>" - shown object info, incl meta data
    if ("head".equals(command)) {
      if (components.length == 1) {
        try {
          FilesAccountInfo info = client.getAccountInfo();
          System.out.println("Account information:");
          System.out.println("  Number of Containers: " + info.getContainerCount());
          System.out.println("    Total Account Size: " + info.getBytesUsed());
          System.out.println();
        }
        catch (Exception e) {
          System.err.println("Error getting container info");
          e.printStackTrace();
View Full Code Here


      byte randomData[] = makeRandomBytes();
      assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", filename, new HashMap<String,String>()));
     
      // Do the test if we have an account
      if (FilesUtil.getProperty("account") != null) {
        FilesAccountInfo info = client.getAccountInfo();
        assertTrue(info.getContainerCount() > 0);
        assertTrue(info.getBytesUsed() >= randomData.length);
      }
     
      // Clean up
      client.deleteObject(containerName, filename);
      assertTrue(client.deleteContainer(containerName));
View Full Code Here

      byte randomData[] = makeRandomBytes();
      assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", filename, new HashMap<String,String>()));
     
      // Do the test if we have an account
      if (FilesUtil.getProperty("account") != null) {
        FilesAccountInfo info = client.getAccountInfo();
        assertTrue(info.getContainerCount() > 0);
        assertTrue(info.getBytesUsed() >= randomData.length);
      }
     
      // Clean up
      client.deleteObject(containerName, filename);
      assertTrue(client.deleteContainer(containerName));
View Full Code Here

TOP

Related Classes of com.rackspacecloud.client.cloudfiles.FilesAccountInfo

Copyright © 2018 www.massapicom. 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.