Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.BlobStoreContext.utils()


   public InputStream getBlobInputStream(BlobStore blobStore, String containerName, String blobName, boolean signedRequest)
         throws Exception {
      if (signedRequest) {
         BlobStoreContext context = blobStore.getContext();
         HttpRequest request = context.getSigner().signGetBlob(containerName, blobName);
         HttpClient httpClient = context.utils().http();
         HttpResponse response = httpClient.invoke(request);
         int statusCode = response.getStatusCode();
         if (statusCode != 200) {
            throw new IOException(response.getStatusLine());
         }
View Full Code Here


      }

      if (signedRequest) {
         BlobStoreContext context = blobStore.getContext();
         HttpRequest request = context.getSigner().signPutBlob(bucket, blob);
         HttpClient httpClient = context.utils().http();
         HttpResponse response = httpClient.invoke(request);
         int statusCode = response.getStatusCode();
         if (statusCode != 200 && statusCode != 201) {
            throw new IOException(response.getStatusLine());
         }
View Full Code Here

   public InputSupplier<InputStream> getBlobInputStream(BlobStore blobStore, String containerName, String blobName, boolean signedRequest)
         throws Exception {
      if (signedRequest) {
         BlobStoreContext context = blobStore.getContext();
         HttpRequest request = context.getSigner().signGetBlob(containerName, blobName);
         HttpClient httpClient = context.utils().http();
         HttpResponse response = httpClient.invoke(request);
         int statusCode = response.getStatusCode();
         if (statusCode != 200) {
            throw new IOException(response.getStatusLine());
         }
View Full Code Here

      }

      if (signedRequest) {
         BlobStoreContext context = blobStore.getContext();
         HttpRequest request = context.getSigner().signPutBlob(bucket, blob);
         HttpClient httpClient = context.utils().http();
         HttpResponse response = httpClient.invoke(request);
         int statusCode = response.getStatusCode();
         if (statusCode != 200 && statusCode != 201) {
            throw new IOException(response.getStatusLine());
         }
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.