org.jclouds.openstack.swift.domain.internal
Class DelegatingMutableObjectInfoWithMetadata

java.lang.Object
  extended by org.jclouds.io.ContentMetadataBuilder
      extended by org.jclouds.io.payloads.BaseMutableContentMetadata
          extended by org.jclouds.openstack.swift.domain.internal.DelegatingMutableObjectInfoWithMetadata
All Implemented Interfaces:
Serializable, Comparable<ObjectInfo>, ContentMetadata, MutableContentMetadata, MutableObjectInfoWithMetadata, ObjectInfo

public class DelegatingMutableObjectInfoWithMetadata
extends BaseMutableContentMetadata
implements MutableObjectInfoWithMetadata

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
DelegatingMutableObjectInfoWithMetadata(MutableObjectInfoWithMetadata delegate)
           
 
Method Summary
 int compareTo(ObjectInfo o)
           
 Long getBytes()
           
 String getContainer()
           
 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.
 MutableObjectInfoWithMetadata getDelegate()
           
 byte[] getHash()
           
 Date getLastModified()
           
 Map<String,String> getMetadata()
           
 String getName()
           
 URI getUri()
           
 int hashCode()
           
 void setBytes(Long bytes)
           
 void setContainer(String container)
           
 void setContentLength(Long bytes)
          
 void setContentMD5(byte[] hash)
          
 void setContentType(String contentType)
          
 void setHash(byte[] hash)
           
 void setLastModified(Date lastModified)
           
 void setName(String name)
           
 void setUri(URI uri)
           
 
Methods inherited from class org.jclouds.io.payloads.BaseMutableContentMetadata
fromContentMetadata, getContentDisposition, getContentEncoding, getContentLanguage, setContentDisposition, setContentEncoding, setContentLanguage, setPropertiesFromHttpHeaders, toBuilder
 
Methods inherited from class org.jclouds.io.ContentMetadataBuilder
build, contentDisposition, contentEncoding, contentLanguage, contentLength, contentMD5, contentType, create, equals, fromHttpHeaders, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DelegatingMutableObjectInfoWithMetadata

public DelegatingMutableObjectInfoWithMetadata(MutableObjectInfoWithMetadata delegate)
Method Detail

getContentLength

public Long getContentLength()
Description copied from class: BaseMutableContentMetadata
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
Overrides:
getContentLength in class BaseMutableContentMetadata
Returns:
the length in bytes that can be be obtained from #getInput()
See Also:
HttpHeaders.CONTENT_LENGTH, GetOptions

getContentType

public String getContentType()
Description copied from class: BaseMutableContentMetadata
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
Specified by:
getContentType in interface ObjectInfo
Overrides:
getContentType in class BaseMutableContentMetadata
See Also:

getContentMD5

public byte[] getContentMD5()
Description copied from class: BaseMutableContentMetadata

Specified by:
getContentMD5 in interface ContentMetadata
Overrides:
getContentMD5 in class BaseMutableContentMetadata

hashCode

public int hashCode()
Overrides:
hashCode in class ContentMetadataBuilder

setContentLength

public void setContentLength(Long bytes)
Description copied from class: BaseMutableContentMetadata

Specified by:
setContentLength in interface MutableContentMetadata
Overrides:
setContentLength in class BaseMutableContentMetadata

setContentType

public void setContentType(String contentType)
Description copied from class: BaseMutableContentMetadata

Specified by:
setContentType in interface MutableContentMetadata
Specified by:
setContentType in interface MutableObjectInfoWithMetadata
Overrides:
setContentType in class BaseMutableContentMetadata

setContentMD5

public void setContentMD5(byte[] hash)
Description copied from class: BaseMutableContentMetadata

Specified by:
setContentMD5 in interface MutableContentMetadata
Overrides:
setContentMD5 in class BaseMutableContentMetadata

getDelegate

public MutableObjectInfoWithMetadata getDelegate()

getMetadata

public Map<String,String> getMetadata()
Specified by:
getMetadata in interface MutableObjectInfoWithMetadata

setBytes

public void setBytes(Long bytes)
Specified by:
setBytes in interface MutableObjectInfoWithMetadata

setHash

public void setHash(byte[] hash)
Specified by:
setHash in interface MutableObjectInfoWithMetadata

setLastModified

public void setLastModified(Date lastModified)
Specified by:
setLastModified in interface MutableObjectInfoWithMetadata

setName

public void setName(String name)
Specified by:
setName in interface MutableObjectInfoWithMetadata

getBytes

public Long getBytes()
Specified by:
getBytes in interface ObjectInfo

getHash

public byte[] getHash()
Specified by:
getHash in interface ObjectInfo

getLastModified

public Date getLastModified()
Specified by:
getLastModified in interface ObjectInfo

getName

public String getName()
Specified by:
getName in interface ObjectInfo

compareTo

public int compareTo(ObjectInfo o)
Specified by:
compareTo in interface Comparable<ObjectInfo>

setContainer

public void setContainer(String container)
Specified by:
setContainer in interface MutableObjectInfoWithMetadata

getContainer

public String getContainer()
Specified by:
getContainer in interface ObjectInfo

setUri

public void setUri(URI uri)
Specified by:
setUri in interface MutableObjectInfoWithMetadata

getUri

public URI getUri()
Specified by:
getUri in interface ObjectInfo


Copyright © 2009-2011 jclouds. All Rights Reserved.