Date expires = null;
ImmutableMap.Builder<String, String> userMetadata = ImmutableMap.builder();
if (getFileStore(file.toPath()).supportsFileAttributeView(UserDefinedFileAttributeView.class)) {
UserDefinedFileAttributeView view = getFileAttributeView(path, UserDefinedFileAttributeView.class);
Set<String> attributes = ImmutableSet.copyOf(view.list());
contentDisposition = readStringAttributeIfPresent(view, attributes, XATTR_CONTENT_DISPOSITION);
contentEncoding = readStringAttributeIfPresent(view, attributes, XATTR_CONTENT_ENCODING);
contentLanguage = readStringAttributeIfPresent(view, attributes, XATTR_CONTENT_LANGUAGE);
contentType = readStringAttributeIfPresent(view, attributes, XATTR_CONTENT_TYPE);