Package com.woorea.openstack.swift

Examples of com.woorea.openstack.swift.Swift.containers()


      Swift swift = new Swift(KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "object-store", null, "public"));
      swift.setTokenProvider(new OpenStackSimpleTokenProvider(access.getToken().getId()));
   
      //swiftClient.execute(new DeleteContainer("navidad2"));
     
      swift.containers().create("navidad2").execute();
     
      System.out.println(swift.containers().list());
     
      ObjectForUpload upload = new ObjectForUpload();
      upload.setContainer("navidad2");
View Full Code Here


   
      //swiftClient.execute(new DeleteContainer("navidad2"));
     
      swift.containers().create("navidad2").execute();
     
      System.out.println(swift.containers().list());
     
      ObjectForUpload upload = new ObjectForUpload();
      upload.setContainer("navidad2");
      upload.setName("example2");
      upload.setInputStream(new FileInputStream(TEST_FILE));
View Full Code Here

     
      ObjectForUpload upload = new ObjectForUpload();
      upload.setContainer("navidad2");
      upload.setName("example2");
      upload.setInputStream(new FileInputStream(TEST_FILE));
      swift.containers().container("navidad2").upload(upload).execute();
     
//      System.out.println(swiftClient.execute(new ListObjects("navidad2", new HashMap<String, String>() {{
//        put("path", "");
//      }})).get(0).getContentType());
     
View Full Code Here

//      System.out.println(swiftClient.execute(new ListObjects("navidad2", new HashMap<String, String>() {{
//        put("path", "");
//      }})).get(0).getContentType());
     
     
      ObjectDownload download = swift.containers().container("navidad").download("example2").execute();
      write(download.getInputStream(), "example2");
    }

  }
 
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.