|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.services.bos.model.ObjectMetadata
public class ObjectMetadata
Represents the object metadata that is stored with Baidu Bos. This includes custom user-supplied metadata, as well as the standard HTTP headers that Baidu Bos sends and receives (Content-Length, ETag, Content-MD5, etc.).
Constructor Summary | |
---|---|
ObjectMetadata()
|
|
ObjectMetadata(ObjectMetadata other)
|
Method Summary | |
---|---|
void |
addUserMetadata(String key,
String value)
Adds the key value pair of custom user-metadata for the associated object. |
long |
getAppendOffset()
|
String |
getBceContentSha256()
Gets the SHA-256 of the object content. |
String |
getCacheControl()
|
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. |
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. |
String |
getContentRange()
Gets the content range of object. |
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. |
String |
getExpires()
|
long |
getInstanceLength()
Returns the physical length of the entire object stored in Bos. |
Date |
getLastModified()
Gets the value of the Last-Modified header, indicating the date and time at which Baidu Bos last recorded a modification to the associated object. |
String |
getObjectType()
|
String |
getStorageClass()
|
Map<String,String> |
getUserMetadata()
Gets the custom user-metadata for the associated object. |
String |
getUserMetaDataOf(String key)
For internal use only. |
String |
getxBceCrc()
Gets the crc of object. |
void |
setAppendOffset(long appendOffset)
|
void |
setBceContentSha256(String bceContentSha256)
Sets the SHA-256 of the object content. |
void |
setCacheControl(String cacheControl)
|
void |
setContentDisposition(String contentDisposition)
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 contentEncoding)
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 |
setContentLength(long contentLength)
Sets the Content-Length HTTP header indicating the size of the associated object in bytes. |
void |
setContentMd5(String contentMd5)
Sets the base64 encoded 128-bit MD5 digest of the associated object (content - not including headers) according to RFC 1864. |
void |
setContentRange(String contentRange)
Sets the content range of object. |
void |
setContentType(String contentType)
Sets the Content-Type HTTP header indicating the type of content stored in the associated object. |
void |
setETag(String eTag)
Sets the hex encoded 128-bit MD5 digest of the associated object according to RFC 1864. |
void |
setExpires(String expires)
|
void |
setInstanceLength(long instanceLength)
Sets the physical length of the entire object stored in Bos. |
void |
setLastModified(Date lastModified)
For internal use only. |
void |
setObjectType(String objectType)
|
void |
setStorageClass(String storageClass)
|
void |
setUserMetadata(Map<String,String> userMetadata)
Sets the custom user-metadata for the associated object. |
void |
setxBceCrc(String xBceCrc)
Sets the crc of object. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectMetadata()
public ObjectMetadata(ObjectMetadata other)
Method Detail |
---|
public Map<String,String> getUserMetadata()
public void setUserMetadata(Map<String,String> userMetadata)
userMetadata
- The custom user-metadata for the associated object. Note that
the key should not include the internal Bos HTTP header prefix.public void addUserMetadata(String key, String value)
key
- The key for the custom user metadata entry. Note that the key
should not include the internal Bos HTTP header prefix.value
- The value for the custom user-metadata entry.public String getUserMetaDataOf(String key)
key
- the key of the userMetadata
public void setContentRange(String contentRange)
contentRange
- The content range of object.public String getContentRange()
public String getBceContentSha256()
public void setBceContentSha256(String bceContentSha256)
bceContentSha256
- The SHA-256 of the object content.public String getContentDisposition()
null
if the Content-Disposition header hasn't been set.public void setContentDisposition(String contentDisposition)
contentDisposition
- The value for the Content-Disposition header.public String getContentEncoding()
null
if it hasn't been set.public void setContentEncoding(String contentEncoding)
contentEncoding
- The HTTP Content-Encoding header, as defined in RFC 2616.public long getContentLength()
null
if it hasn't been set yet.public void setContentLength(long contentLength)
contentLength
- The Content-Length HTTP header indicating the size of the
associated object in bytes.public String getContentMd5()
null
if the MD5 hash of the content hasn't been set.public void setContentMd5(String contentMd5)
contentMd5
- The base64 encoded MD5 hash of the content for the object
associated with this metadata.public String getContentType()
null
if it hasn't been set.public void setContentType(String contentType)
contentType
- The HTTP Content-Type header indicating the type of content
stored in the associated Bos object.public String getETag()
This field represents the hex encoded 128-bit MD5 digest of an object's content as calculated by Baidu Bos. The ContentMD5 field represents the base64 encoded 128-bit MD5 digest as calculated on the caller's side.
null
if it hasn't been set yet.public void setETag(String eTag)
This field represents the hex encoded 128-bit MD5 digest of an object's content as calculated by Baidu Bos. The ContentMD5 field represents the base64 encoded 128-bit MD5 digest as calculated on the caller's side.
eTag
- The hex encoded MD5 hash of the content for the associated object
as calculated by Baidu Bos.public long getInstanceLength()
public void setInstanceLength(long instanceLength)
instanceLength
- the physical length of the entire objectpublic Date getLastModified()
null
if
the Last-Modified header hasn't been set.public void setLastModified(Date lastModified)
lastModified
- The date and time at which Baidu Bos last recorded a
modification to the associated object.public String toString()
toString
in class Object
public String getExpires()
public void setExpires(String expires)
public long getAppendOffset()
public void setAppendOffset(long appendOffset)
public String getObjectType()
public void setObjectType(String objectType)
public String getCacheControl()
public void setCacheControl(String cacheControl)
public String getStorageClass()
public void setStorageClass(String storageClass)
public String getxBceCrc()
public void setxBceCrc(String xBceCrc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |