org.jclouds.io
Class ContentMetadataCodec.DefaultContentMetadataCodec

java.lang.Object
  extended by 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.

Author:
aled

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jclouds.io.ContentMetadataCodec
ContentMetadataCodec.DefaultContentMetadataCodec
 
Field Summary
protected  Logger logger
           
 
Constructor Summary
ContentMetadataCodec.DefaultContentMetadataCodec(DateCodecFactory dateCodecs)
           
 
Method Summary
 void fromHeaders(MutableContentMetadata contentMetadata, com.google.common.collect.Multimap<String,String> headers)
          Sets properties related to the http headers listed in ContentMetadata.HTTP_HEADERS
protected  DateCodec getExpiresDateCodec()
           
 Date parseExpires(String expires)
          Parses the 'Expires' header.
 com.google.common.collect.Multimap<String,String> toHeaders(ContentMetadata md)
          Generates standard HTTP headers for the give metadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logger logger
Constructor Detail

ContentMetadataCodec.DefaultContentMetadataCodec

@Inject
public ContentMetadataCodec.DefaultContentMetadataCodec(DateCodecFactory dateCodecs)
Method Detail

getExpiresDateCodec

protected DateCodec getExpiresDateCodec()

toHeaders

public com.google.common.collect.Multimap<String,String> toHeaders(ContentMetadata md)
Description copied from interface: ContentMetadataCodec
Generates standard HTTP headers for the give metadata.

Specified by:
toHeaders in interface ContentMetadataCodec

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 in ContentMetadata.HTTP_HEADERS

Specified by:
fromHeaders in interface ContentMetadataCodec

parseExpires

public Date parseExpires(String expires)
Description copied from interface: ContentMetadataCodec
Parses the 'Expires' header. If invalid, returns a date in the past (in accordance with HTTP 1.1 client spec).

Specified by:
parseExpires in interface ContentMetadataCodec


Copyright © 2009-2013 jclouds. All Rights Reserved.