Package com.cloudvane.ossc

Examples of com.cloudvane.ossc.CloudStorageClient


   * @throws ConfigurationException
   */
  public static void main(String[] args) throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException {
         
    FileInputStream stream = new FileInputStream("ossc.config");
    CloudStorageClient c = new CloudStorageClient(stream);
   
    c.getClient().addConfigSetting("Path", "store");
   
    System.out.println("Tests");
    System.out.println("");
   
    CloudDirectory ncd = new CloudDirectory();
    ncd.setDirectoryName("New Directory");
   
    c.getClient().createDirectory(ncd);
   
    listDirectories(c, "List directories");
   
    CloudObject obj = new CloudObject();
    obj.setFileName(UUID.randomUUID().toString() + ".txt");
    obj.setCloudObject(new FileInputStream("ossc.config"));
    obj.setDirectoryName(c.getClient().getFullPath(ncd));
   
    c.getClient().createObject(ncd, obj);
   
    listDirectories(c, "Now with a file");
   
    c.getClient().deleteObject(obj);
   
    listDirectories(c, "Now cleaned again");
   
    c.getClient().deleteDirectory(ncd);
   
    listDirectories(c, "Now deleted the directory");
   
  }
View Full Code Here

TOP

Related Classes of com.cloudvane.ossc.CloudStorageClient

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.