> +         }
> +         if (attributes.contains(XATTR_CONTENT_MD5)) {
> +            ByteBuffer buf = 
> ByteBuffer.allocate(view.size(XATTR_CONTENT_MD5));
> +            view.read(XATTR_CONTENT_MD5, buf);
> +            hashCode = HashCode.fromBytes(buf.array());
> +         }
> +         if (attributes.contains(XATTR_CONTENT_TYPE)) {
> +            ByteBuffer buf = 
> ByteBuffer.allocate(view.size(XATTR_CONTENT_TYPE));
> +            view.read(XATTR_CONTENT_TYPE, buf);
> +            contentType = new String(buf.array(), Charsets.UTF_8);
> +         }
> +         if (attributes.contains(XATTR_EXPIRES)) {
> +            ByteBuffer buf = ByteBuffer.allocate(view.size(XATTR_EXPIRES));
> +            view.read(XATTR_EXPIRES, buf);
> +            buf.flip();
> +            expires = new Date(buf.asLongBuffer().get());

`ByteBuffer.flip` actually *resets* the position, needed for calling `get` but 
not for `array`.

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

Reply via email to