org.jclouds.io.payloads
Class BaseMutableContentMetadata

java.lang.Object
  extended by org.jclouds.io.ContentMetadataBuilder
      extended by org.jclouds.io.payloads.BaseMutableContentMetadata
All Implemented Interfaces:
Serializable, ContentMetadata, MutableContentMetadata
Direct Known Subclasses:
DelegatingMutableObjectInfoWithMetadata

public class BaseMutableContentMetadata
extends ContentMetadataBuilder
implements MutableContentMetadata, Serializable

Author:
Adrian Cole
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jclouds.io.ContentMetadataBuilder
contentDisposition, contentEncoding, contentLanguage, contentLength, contentMD5, contentType
 
Fields inherited from interface org.jclouds.io.ContentMetadata
HTTP_HEADERS
 
Constructor Summary
BaseMutableContentMetadata()
           
 
Method Summary
static BaseMutableContentMetadata fromContentMetadata(ContentMetadata in)
           
 String getContentDisposition()
          Specifies presentational information for the object.
 String getContentEncoding()
          Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type header field.
 String getContentLanguage()
          Get Content Language of the payload

Not all providers may support it

 Long getContentLength()
          Returns the total size of the payload, or the chunk that's available.
 byte[] getContentMD5()
          
 String getContentType()
          A standard MIME type describing the format of the contents.
 void setContentDisposition(String contentDisposition)
          Set Content Disposition of the payload

Not all providers may support it

 void setContentEncoding(String contentEncoding)
          Set Content Encoding of the payload

Not all providers may support it

 void setContentLanguage(String contentLanguage)
          Set Content Language of the payload

Not all providers may support it

 void setContentLength(Long contentLength)
          
 void setContentMD5(byte[] md5)
          
 void setContentType(String contentType)
          
 void setPropertiesFromHttpHeaders(com.google.common.collect.Multimap<String,String> headers)
          sets properties related to the http headers listed in ContentMetadata.HTTP_HEADERS
 BaseMutableContentMetadata toBuilder()
           
 
Methods inherited from class org.jclouds.io.ContentMetadataBuilder
build, contentDisposition, contentEncoding, contentLanguage, contentLength, contentMD5, contentType, create, equals, fromHttpHeaders, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseMutableContentMetadata

public BaseMutableContentMetadata()
Method Detail

setPropertiesFromHttpHeaders

public void setPropertiesFromHttpHeaders(com.google.common.collect.Multimap<String,String> headers)
Description copied from interface: MutableContentMetadata
sets properties related to the http headers listed in ContentMetadata.HTTP_HEADERS

Specified by:
setPropertiesFromHttpHeaders in interface MutableContentMetadata

getContentLength

public Long getContentLength()
Returns the total size of the payload, or the chunk that's available.

Chunking is only used when org.jclouds.http.GetOptions is called with options like tail, range, or startAt.

Specified by:
getContentLength in interface ContentMetadata
Returns:
the length in bytes that can be be obtained from #getInput()
See Also:
HttpHeaders.CONTENT_LENGTH, GetOptions

setContentLength

public void setContentLength(@Nullable
                             Long contentLength)

Specified by:
setContentLength in interface MutableContentMetadata

getContentMD5

public byte[] getContentMD5()

Specified by:
getContentMD5 in interface ContentMetadata

setContentMD5

public void setContentMD5(byte[] md5)

Specified by:
setContentMD5 in interface MutableContentMetadata

getContentType

public String getContentType()
A standard MIME type describing the format of the contents. If none is provided, the default is binary/octet-stream.

Specified by:
getContentType in interface ContentMetadata
See Also:

setContentType

public void setContentType(@Nullable
                           String contentType)

Specified by:
setContentType in interface MutableContentMetadata

setContentDisposition

public void setContentDisposition(@Nullable
                                  String contentDisposition)
Set Content Disposition of the payload

Not all providers may support it

Specified by:
setContentDisposition in interface MutableContentMetadata

getContentDisposition

public String getContentDisposition()
Specifies presentational information for the object.

Specified by:
getContentDisposition in interface ContentMetadata
See Also:

setContentLanguage

public void setContentLanguage(@Nullable
                               String contentLanguage)
Set Content Language of the payload

Not all providers may support it

Specified by:
setContentLanguage in interface MutableContentMetadata

getContentLanguage

public String getContentLanguage()
Get Content Language of the payload

Not all providers may support it

Specified by:
getContentLanguage in interface ContentMetadata

setContentEncoding

public void setContentEncoding(@Nullable
                               String contentEncoding)
Set Content Encoding of the payload

Not all providers may support it

Specified by:
setContentEncoding in interface MutableContentMetadata

getContentEncoding

public String getContentEncoding()
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type header field.

Specified by:
getContentEncoding in interface ContentMetadata
See Also:

toBuilder

public BaseMutableContentMetadata toBuilder()
Specified by:
toBuilder in interface ContentMetadata

fromContentMetadata

public static BaseMutableContentMetadata fromContentMetadata(ContentMetadata in)


Copyright © 2009-2011 jclouds. All Rights Reserved.