Map<String, Metadata> metaMap = new TreeMap<String, Metadata>();
metaMap.putAll( RestUtil.parseMetadataHeader( getFirstHeader( RestUtil.XHEADER_META ), false ) );
metaMap.putAll( RestUtil.parseMetadataHeader( getFirstHeader( RestUtil.XHEADER_LISTABLE_META ), true ) );
String wsChecksumHeader = getFirstHeader( RestUtil.XHEADER_WSCHECKSUM );
ChecksumValue wsChecksum = wsChecksumHeader == null ? null : new ChecksumValueImpl( wsChecksumHeader );
String serverChecksumHeader = getFirstHeader( RestUtil.XHEADER_CONTENT_CHECKSUM );
ChecksumValue serverChecksum = serverChecksumHeader == null ? null :
new ChecksumValueImpl( getFirstHeader( RestUtil.XHEADER_CONTENT_CHECKSUM ) );
metadata = new ObjectMetadata( metaMap, acl, getContentType(), wsChecksum, serverChecksum );
}
return metadata;