org.jclouds.openstack.swift.domain.internal
Class DelegatingMutableObjectInfoWithMetadata
java.lang.Object
org.jclouds.io.ContentMetadataBuilder
org.jclouds.io.payloads.BaseMutableContentMetadata
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
Methods inherited from class org.jclouds.io.ContentMetadataBuilder |
build, contentDisposition, contentEncoding, contentLanguage, contentLength, contentMD5, contentType, create, equals, fromHttpHeaders, toString |
DelegatingMutableObjectInfoWithMetadata
public DelegatingMutableObjectInfoWithMetadata(MutableObjectInfoWithMetadata delegate)
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-2012 jclouds. All Rights Reserved.