public class ObjectMetadata extends HeaderResponse
Constructor and Description |
---|
ObjectMetadata() |
Modifier and Type | Method and Description |
---|---|
void |
addUserMetadata(String key,
String value)
Add customized metadata for an object.
|
String |
getContentEncoding()
Obtain the content encoding of the object.
|
Long |
getContentLength()
Obtain the content length of an object.
|
String |
getContentMd5()
Obtain Base64-encoded MD5 value of an object.
|
String |
getContentType()
Obtain the MIME type of an object.
|
String |
getEtag()
Obtain the ETag of the object.
|
Date |
getLastModified()
Obtain the last modification time of the object.
|
Map<String,Object> |
getMetadata()
Obtain object properties.
|
long |
getNextPosition()
Obtain the start position for next appending.
|
StorageClassEnum |
getObjectStorageClass()
Obtain the object storage class.
|
String |
getStorageClass()
Deprecated.
|
Object |
getUserMetadata(String key)
Obtain the customized metadata of an object.
|
Object |
getValue(String name) |
String |
getWebSiteRedirectLocation()
Set the redirection link which can redirect the request to another object in the bucket or to an external URL.
|
boolean |
isAppendable()
Identify whether an object is appendable.
|
void |
setAppendable(boolean appendable) |
void |
setContentEncoding(String contentEncoding)
Set the content encoding of the object.
|
void |
setContentLength(Long contentLength)
Set the content length of an object.
|
void |
setContentMd5(String contentMd5)
Set the Base64-encoded MD5 value for an object.
|
void |
setContentType(String contentType)
Set the MIME type for an object.
|
void |
setEtag(String objEtag) |
void |
setLastModified(Date lastModified) |
void |
setMetadata(Map<String,Object> metadata)
Set object properties.
|
void |
setNextPosition(long nextPosition) |
void |
setObjectStorageClass(StorageClassEnum storageClass)
Set the object storage class.
|
void |
setStorageClass(String storageClass)
Deprecated.
|
void |
setWebSiteRedirectLocation(String webSiteRedirectLocation)
Obtain the redirection link which can redirect the request to another object in the bucket or to an external URL.
|
String |
toString() |
getRequestId, getResponseHeaders, getStatusCode
public boolean isAppendable()
public void setAppendable(boolean appendable)
public long getNextPosition()
public void setNextPosition(long nextPosition)
public Map<String,Object> getMetadata()
public void addUserMetadata(String key, String value)
key
- Keyword of the customized metadatavalue
- Value of the customized metadatapublic Object getUserMetadata(String key)
key
- Keyword of the customized metadatapublic String getEtag()
public void setEtag(String objEtag)
public void setMetadata(Map<String,Object> metadata)
metadata
- Object propertiespublic Date getLastModified()
public void setLastModified(Date lastModified)
public String getContentEncoding()
public void setContentEncoding(String contentEncoding)
contentEncoding
- Content encodingpublic Long getContentLength()
public void setContentLength(Long contentLength)
contentLength
- Content length of the objectpublic String getContentType()
public void setContentType(String contentType)
contentType
- MIME type of the object@Deprecated public String getStorageClass()
@Deprecated public void setStorageClass(String storageClass)
storageClass
- Object storage classpublic StorageClassEnum getObjectStorageClass()
public void setObjectStorageClass(StorageClassEnum storageClass)
storageClass
- Object storage classpublic String getContentMd5()
public void setContentMd5(String contentMd5)
contentMd5
- Base64-encoded MD5 value of the objectpublic String getWebSiteRedirectLocation()
public void setWebSiteRedirectLocation(String webSiteRedirectLocation)
webSiteRedirectLocation
- Redirection linkpublic String toString()
toString
in class HeaderResponse
Copyright © 2019. All rights reserved.