-1
List<com.vikas.aws.model.S3Object> objects = new ArrayList<com.vikas.aws.model.S3Object>();
ListObjectsRequest request = new ListObjectsRequest(getBucketName(),
String.join("", URL_MEDIA, URL_ORGS, orgId, FORWARD), null, FORWARD,
(size == null ? getMaxKeys() : size));
ObjectListing listing = getAmazonS3Client().listObjects(request);
if (listing != null) {
List<S3ObjectSummary> summaries = listing.getObjectSummaries();
for (S3ObjectSummary s3ObjectSummary : summaries) {
if (!s3ObjectSummary.getKey().contains(Optional.ofNullable(search).orElse(FORWARD))) {
continue;
}
com.vikas.aws.model.S3Object s3Obj = new com.vikas.aws.model.S3Object();
s3Obj.setOrgId(orgId);
s3Obj.setBucketName(s3ObjectSummary.getBucketName());
s3Obj.setKey(s3ObjectSummary.getKey());
s3Obj.setPublicUrl(getMediaPublicUrl(s3ObjectSummary.getKey()));
s3Obj.seteTag(s3ObjectSummary.getETag());
s3Obj.setSize(s3ObjectSummary.getSize());
s3Obj.setLastModified(s3ObjectSummary.getLastModified());
s3Obj.setStorageClass(s3ObjectSummary.getStorageClass());
objects.add(s3Obj);
}
}
return objects;
}
目前我的項目工作AWS S3亞馬遜的存儲,我想與蔚藍的Blob存儲改變它,但我實現這麼多的東西一樣上傳,刪除,和下載的斑點,創建容器,但由於一些要求,我想得到blob的細節,這是在上面的代碼與S3亞馬遜,如何將與azure blob實現它。如何找到Azure雲BLOB細節
上面的代碼做了太多事情。你能否請你更新你的問題,並解釋你到底想要完成什麼? –
請再看看我的代碼。 – thevikasdube
我建議看看這裏:https://azure.microsoft.com/en-in/documentation/articles/storage-java-how-to-use-blob-storage/。這應該可以幫助您開始使用Java SDK開始使用Blob存儲。 –