> @@ -216,7 +287,35 @@ public String putBlob(final String containerName, final 
> Blob blob) throws IOExce
>                    " expected: " + expectedHashCode);
>           }
>           payload.getContentMetadata().setContentMD5(actualHashCode);
> -         // TODO: store metadata in extended attributes when moving to Java 7
> +         UserDefinedFileAttributeView view = 
> java.nio.file.Files.getFileAttributeView(
> +            outputFile.toPath(), UserDefinedFileAttributeView.class);
> +         view.write(XATTR_CONTENT_MD5, 
> ByteBuffer.wrap(actualHashCode.asBytes()));
> +         String contentDisposition = 
> payload.getContentMetadata().getContentDisposition();
> +         if (contentDisposition != null) {
> +            view.write(XATTR_CONTENT_DISPOSITION, 
> ByteBuffer.wrap(contentDisposition.getBytes(Charsets.UTF_8)));
> +         }

Done.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/443/files#r16027473

Reply via email to