BlobMetadata blobMetadata = blobStore.blobMetadata(containerName, blobName);
if (blobMetadata == null) {
throw new KeyNotFoundException(containerName, blobName, "while getting metadata");
}
ContentMetadata contentMetdata = blobMetadata.getContentMetadata();
System.out.println(blobName + ":");
printMetadata("Content-Disposition", contentMetdata.getContentDisposition());
printMetadata("Content-Encoding", contentMetdata.getContentEncoding());
printMetadata("Content-Language", contentMetdata.getContentLanguage());
byte[] contentMD5 = contentMetdata.getContentMD5();
if (contentMD5 != null) {
printMetadata("Content-MD5",
BaseEncoding.base16().lowerCase().encode(contentMD5));
}
printMetadata("Content-Type", contentMetdata.getContentType());
printMetadata("Expires", contentMetdata.getExpires());
printMetadata("Length", contentMetdata.getContentLength());
System.out.println("");
}
return null;
}