> @@ -182,9 +197,65 @@ public Blob getBlob(final String container, final String
> key) {
> File file = getFileForBlobKey(container, key);
> ByteSource byteSource = Files.asByteSource(file);
> try {
> + String contentDisposition = null;
> + String contentEncoding = null;
> + String contentLanguage = null;
> + String contentType = null;
> + Date expires = null;
> + HashCode hashCode = null;
> + UserDefinedFileAttributeView view =
> java.nio.file.Files.getFileAttributeView(
> + file.toPath(), UserDefinedFileAttributeView.class);
> + Set<String> attributes = ImmutableSet.copyOf(view.list());
> + if (attributes.contains(XATTR_CONTENT_DISPOSITION)) {
> + ByteBuffer buf =
> ByteBuffer.allocate(view.size(XATTR_CONTENT_DISPOSITION));
> + view.read(XATTR_CONTENT_DISPOSITION, buf);
> + contentDisposition = new String(buf.array(), Charsets.UTF_8);
[minor] Extract these duplicated three lines into a method `readAttr` or so?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/443/files#r16025754