@Test
 void testOneRange() {
   BlobToHttpGetOptions converter = new BlobToHttpGetOptions();
   org.jclouds.blobstore.options.GetOptions blobGet =
       new org.jclouds.blobstore.options.GetOptions().range(2, 5);
   GetOptions httpGet = converter.apply(blobGet);
   assertEquals(httpGet.buildRequestHeaders().get("Range"), ImmutableSet.of("bytes=2-5"));
 }
 @Override
 public HttpRequest signGetBlob(
     String container, String name, org.jclouds.blobstore.options.GetOptions options) {
   checkNotNull(container, "container");
   checkNotNull(name, "name");
   return cleanRequest(
       processor.apply(
           Invocation.create(
               getMethod,
               ImmutableList.of(
                   getPath(container, name),
                   blob2ObjectGetOptions.apply(checkNotNull(options, "options"))))));
 }
Beispiel #3
0
 /**
  * This implementation invokes {@link S3Client#getObject}
  *
  * @param container bucket name
  * @param key object key
  */
 @Override
 public Blob getBlob(
     String container, String key, org.jclouds.blobstore.options.GetOptions optionsList) {
   GetOptions httpOptions = blob2ObjectGetOptions.apply(optionsList);
   return object2Blob.apply(sync.getObject(container, key, httpOptions));
 }