Package org.jclouds.io
Class ContentMetadataCodec.DefaultContentMetadataCodec
java.lang.Object
org.jclouds.io.ContentMetadataCodec.DefaultContentMetadataCodec
- All Implemented Interfaces:
ContentMetadataCodec
- Enclosing interface:
ContentMetadataCodec
public static class ContentMetadataCodec.DefaultContentMetadataCodec
extends Object
implements ContentMetadataCodec
Default implementation, in accordance with HTTP 1.1 spec.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jclouds.io.ContentMetadataCodec
ContentMetadataCodec.DefaultContentMetadataCodec
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
fromHeaders
(MutableContentMetadata contentMetadata, com.google.common.collect.Multimap<String, String> headers) Sets properties related to the http headers listed inContentMetadata.HTTP_HEADERS
protected DateCodec
parseExpires
(String expires) Parses the date from the given Expires header.Generates standard HTTP headers for the give metadata.
-
Field Details
-
logger
-
-
Constructor Details
-
DefaultContentMetadataCodec
-
-
Method Details
-
getExpiresDateCodec
-
getExpiresDateDecoders
-
toHeaders
Description copied from interface:ContentMetadataCodec
Generates standard HTTP headers for the give metadata.- Specified by:
toHeaders
in interfaceContentMetadataCodec
-
fromHeaders
public void fromHeaders(MutableContentMetadata contentMetadata, com.google.common.collect.Multimap<String, String> headers) Description copied from interface:ContentMetadataCodec
Sets properties related to the http headers listed inContentMetadata.HTTP_HEADERS
- Specified by:
fromHeaders
in interfaceContentMetadataCodec
-
parseExpires
Parses the date from the given Expires header.According to the RFC, dates should always come in RFC-1123 format. However, clients should also support older and deprecated formats for compatibility, so this method will try to parse an RFC-1123 date, and fallback to the ANSI C format.
- Specified by:
parseExpires
in interfaceContentMetadataCodec
-