public class ObjectMetadata extends Object implements Serializable
| Constructor and Description |
|---|
ObjectMetadata()
Initialize a new objectmetadata
|
ObjectMetadata(Map<String,Object> metadata)
Initialize a new objectmetadata
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMetaData(String key,
Object value) |
String |
getCacheControl()
Gets the optional Cache-Control HTTP header which allows the user to
specify caching behavior along the HTTP request/reply chain.
|
String |
getContentDisposition()
Gets the optional Content-Disposition HTTP header, which specifies
presentation information for the object such as the recommended filename
for the object to be saved as.
|
String |
getContentEncoding()
Gets the optional Content-Encoding HTTP header specifying what
content encodings have been applied to the object and what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type field.
|
String |
getContentLanguage()
Gets the Content-Language HTTP header, which describes the natural language(s) of the
intended audience for the enclosed entity.
|
long |
getContentLength()
Gets the Content-Length HTTP header indicating the size of the
associated object in bytes.
|
String |
getContentMD5()
Gets the base64 encoded 128-bit MD5 digest of the associated object
(content - not including headers) according to RFC 1864.
|
Long[] |
getContentRange()
Returns the content range of the object if response contains the Content-Range header.
|
String |
getContentType()
Gets the Content-Type HTTP header, which indicates the type of content
stored in the associated object.
|
String |
getETag()
Gets the hex encoded 128-bit MD5 digest of the associated object
according to RFC 1864.
|
long |
getInstanceLength()
Returns the physical length of the entire object stored in S3.
|
Date |
getLastModified()
Gets the value of the Last-Modified header, indicating the date
and time at which ObjectStorageClient last recorded a modification to the
associated object.
|
Map<String,Object> |
getRawMetadata()
Gets a map of the raw metadata/headers for the associated object.
|
Object |
getRawMetadataValue(String key)
Returns the raw value of the metadata/headers for the specified key.
|
void |
setCacheControl(String cacheControl)
Sets the optional Cache-Control HTTP header which allows the user to
specify caching behavior along the HTTP request/reply chain.
|
void |
setContentDisposition(String disposition)
Sets the optional Content-Disposition HTTP header, which specifies
presentational information such as the recommended filename for the
object to be saved as.
|
void |
setContentEncoding(String encoding)
Sets the optional Content-Encoding HTTP header specifying what
content encodings have been applied to the object and what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type field.
|
void |
setContentLanguage(String contentLanguage)
Sets the Content-Language HTTP header which describes the natural language(s) of the
intended audience for the enclosed entity.
|
void |
setContentLength(long contentLength)
Sets the Content-Length HTTP header indicating the size of the
associated object in bytes.
|
void |
setContentMD5(String md5Base64)
Sets the base64 encoded 128-bit MD5 digest of the associated object
(content - not including headers) according to RFC 1864.
|
void |
setContentType(String contentType)
Sets the Content-Type HTTP header indicating the type of content
stored in the associated object.
|
void |
setETag(String eTag) |
void |
setHeader(String key,
Object value)
For internal use only.
|
void |
setLastModified(Date lastModified)
For internal use only.
|
public void setHeader(String key, Object value)
key - The name of the header being set.value - The value for the header.public Map<String,Object> getRawMetadata()
public Object getRawMetadataValue(String key)
key - public Date getLastModified()
public void setLastModified(Date lastModified)
lastModified - The date and time at which ObjectStorageClient last recorded a
modification to the associated object.public long getContentLength()
ObjectMetadata.setContentLength(long)public long getInstanceLength()
public void setContentLength(long contentLength)
contentLength - The Content-Length HTTP header indicating the size of the
associated object in bytes.ObjectMetadata.getContentLength()public String getContentType()
ObjectMetadata.setContentType(String)public void setContentType(String contentType)
contentType - The HTTP Content-Type header indicating the type of content
stored in the associated storage object.ObjectMetadata.getContentType()public String getContentLanguage()
ObjectMetadata.setContentLanguage(String)public void setContentLanguage(String contentLanguage)
contentLanguage - The HTTP Content-Language header which describes the natural language(s) of the
intended audience for the enclosed entity.ObjectMetadata.getContentLanguage()public String getContentEncoding()
ObjectMetadata.setContentType(String)public void setContentEncoding(String encoding)
encoding - The HTTP Content-Encoding header, as defined in RFC 2616.ObjectMetadata.getContentType()public String getCacheControl()
ObjectMetadata.setCacheControl(String)public void setCacheControl(String cacheControl)
cacheControl - The HTTP Cache-Control header as defined in RFC 2616.ObjectMetadata.getCacheControl()public void setContentMD5(String md5Base64)
md5Base64 - The base64 encoded MD5 hash of the content for the object
associated with this metadata.ObjectMetadata.getContentMD5()public String getContentMD5()
ObjectMetadata.setContentMD5(String)public void setContentDisposition(String disposition)
disposition - The value for the Content-Disposition header.ObjectMetadata.getContentDisposition()public String getContentDisposition()
ObjectMetadata.setCacheControl(String)public String getETag()
public void setETag(String eTag)
public Long[] getContentRange()
Copyright © 2018. All rights reserved.