本文整理汇总了Java中org.jclouds.blobstore.options.GetOptions.NONE属性的典型用法代码示例。如果您正苦于以下问题:Java GetOptions.NONE属性的具体用法?Java GetOptions.NONE怎么用?Java GetOptions.NONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jclouds.blobstore.options.GetOptions
的用法示例。
在下文中一共展示了GetOptions.NONE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBlob
/**
* Applies the {@link GetOptionFileAttribute} if they exist to the {@link BlobStore#getBlob(String, String, GetOptions)} method.
*/
@Override
public Blob getBlob(BlobStoreContext blobStoreContext, CloudPath path, GetOptionFileAttribute getOption) {
GetOptions getOptions = getOption == null ? GetOptions.NONE : getOption.value();
return blobStoreContext.getBlobStore().getBlob(path.getContainerName(), path.getPathName(), getOptions);
}
示例2: testGetFileAttributeOfType
@Test
public void testGetFileAttributeOfType() {
CloudPermissionFileAttribute<AccessControlList> permAcl =
new CloudPermissionFileAttribute<AccessControlList>(new AccessControlList());
CloudPermissionFileAttribute<PosixFilePermission> permPosix =
new CloudPermissionFileAttribute<PosixFilePermission>(PosixFilePermission.GROUP_WRITE);
ContentTypeFileAttribute contentTypeGif = new ContentTypeFileAttribute(MediaType.GIF);
GetOptionFileAttribute getOption = new GetOptionFileAttribute(GetOptions.NONE);
PutOptionFileAttribute putOption = new PutOptionFileAttribute(PutOptions.NONE);
FileAttributeLookupMap lookupMap = new FileAttributeLookupMap(
permAcl,
permPosix,
contentTypeGif,
getOption,
putOption);
// Test getting them explicitly by type
Assert.assertEquals(lookupMap.toString(),
permAcl, lookupMap.getFileAttributeOfType(CloudPermissionFileAttribute.class, AccessControlList.class));
Assert.assertEquals(lookupMap.toString(),
permPosix, lookupMap.getFileAttributeOfType(CloudPermissionFileAttribute.class, PosixFilePermission.class));
Assert.assertEquals(lookupMap.toString(),
contentTypeGif, lookupMap.getFileAttributeOfType(ContentTypeFileAttribute.class, MediaType.class));
Assert.assertEquals(lookupMap.toString(),
getOption, lookupMap.getFileAttributeOfType(GetOptionFileAttribute.class, GetOptions.class));
Assert.assertEquals(lookupMap.toString(),
putOption, lookupMap.getFileAttributeOfType(PutOptionFileAttribute.class, ImmutablePutOptions.class));
// Test getting all of the attributes of a type
Collection<CloudPermissionFileAttribute> permAttributes =
lookupMap.getFileAttributesOfType(CloudPermissionFileAttribute.class);
Assert.assertEquals(2, permAttributes.size());
Assert.assertTrue(permAttributes.contains(permAcl));
Assert.assertTrue(permAttributes.contains(permPosix));
Collection<ContentTypeFileAttribute> contentTypeAttributes =
lookupMap.getFileAttributesOfType(ContentTypeFileAttribute.class);
Assert.assertEquals(1, contentTypeAttributes.size());
Assert.assertEquals(contentTypeGif, contentTypeAttributes.iterator().next());
Collection<GetOptionFileAttribute> getOptionAttributes =
lookupMap.getFileAttributesOfType(GetOptionFileAttribute.class);
Assert.assertEquals(1, getOptionAttributes.size());
Assert.assertEquals(getOption, getOptionAttributes.iterator().next());
Collection<PutOptionFileAttribute> putOptionAttributes =
lookupMap.getFileAttributesOfType(PutOptionFileAttribute.class);
Assert.assertEquals(1, putOptionAttributes.size());
Assert.assertEquals(putOption, putOptionAttributes.iterator().next());
}
示例3: BlobStoreByteSource
public BlobStoreByteSource(BlobStore blobStore, Blob blob, long size) throws IOException {
this(blobStore, blob, GetOptions.NONE, size);
}