org.jclouds.atmos.domain.internal
Class DelegatingMutableContentMetadata

java.lang.Object
  extended by org.jclouds.atmos.domain.internal.DelegatingMutableContentMetadata
All Implemented Interfaces:
ContentMetadata, MutableContentMetadata

public class DelegatingMutableContentMetadata
extends Object
implements MutableContentMetadata

Author:
Adrian Cole

Field Summary
 
Fields inherited from interface org.jclouds.io.ContentMetadata
HTTP_HEADERS
 
Constructor Summary
DelegatingMutableContentMetadata()
           
DelegatingMutableContentMetadata(URI uri, String name, String path, MutableContentMetadata delegate)
           
 
Method Summary
 boolean equals(Object obj)
           
 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.
 MutableContentMetadata getDelegate()
           
 String getName()
           
 String getPath()
           
 URI getUri()
           
 int hashCode()
           
 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[] contentMD5)
           
 void setContentType(String contentType)
           
 void setName(String name)
           
 void setPath(String path)
           
 void setPropertiesFromHttpHeaders(com.google.common.collect.Multimap<String,String> headers)
          sets properties related to the http headers listed in ContentMetadata.HTTP_HEADERS
 void setUri(URI uri)
           
 ContentMetadataBuilder toBuilder()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatingMutableContentMetadata

public DelegatingMutableContentMetadata()

DelegatingMutableContentMetadata

public DelegatingMutableContentMetadata(URI uri,
                                        String name,
                                        String path,
                                        MutableContentMetadata delegate)
Method Detail

getContentLength

public Long getContentLength()
Description copied from interface: ContentMetadata
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

getContentMD5

public byte[] getContentMD5()
Specified by:
getContentMD5 in interface ContentMetadata

getContentType

public String getContentType()
Description copied from interface: ContentMetadata
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:

getName

public String getName()

setContentLength

public void setContentLength(Long contentLength)
Specified by:
setContentLength in interface MutableContentMetadata

setContentMD5

public void setContentMD5(byte[] contentMD5)
Specified by:
setContentMD5 in interface MutableContentMetadata

setContentType

public void setContentType(String contentType)
Specified by:
setContentType in interface MutableContentMetadata

setName

public void setName(String name)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getDelegate

public MutableContentMetadata getDelegate()

setContentDisposition

public void setContentDisposition(String contentDisposition)
Description copied from interface: MutableContentMetadata
Set Content Disposition of the payload

Not all providers may support it

Specified by:
setContentDisposition in interface MutableContentMetadata

setContentEncoding

public void setContentEncoding(String contentEncoding)
Description copied from interface: MutableContentMetadata
Set Content Encoding of the payload

Not all providers may support it

Specified by:
setContentEncoding in interface MutableContentMetadata

setContentLanguage

public void setContentLanguage(String contentLanguage)
Description copied from interface: MutableContentMetadata
Set Content Language of the payload

Not all providers may support it

Specified by:
setContentLanguage in interface MutableContentMetadata

getContentDisposition

public String getContentDisposition()
Description copied from interface: ContentMetadata
Specifies presentational information for the object.

Specified by:
getContentDisposition in interface ContentMetadata
See Also:

getContentEncoding

public String getContentEncoding()
Description copied from interface: ContentMetadata
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:

getContentLanguage

public String getContentLanguage()
Description copied from interface: ContentMetadata
Get Content Language of the payload

Not all providers may support it

Specified by:
getContentLanguage in interface ContentMetadata

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

toBuilder

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

getUri

public URI getUri()

setUri

public void setUri(URI uri)

getPath

public String getPath()

setPath

public void setPath(String path)


Copyright © 2009-2011 jclouds. All Rights Reserved.