Package org.jclouds.io.payloads
Class BaseMutableContentMetadata
- java.lang.Object
-
- org.jclouds.io.ContentMetadataBuilder
-
- org.jclouds.io.payloads.BaseMutableContentMetadata
-
- All Implemented Interfaces:
ContentMetadata,MutableContentMetadata
public class BaseMutableContentMetadata extends ContentMetadataBuilder implements MutableContentMetadata
-
-
Field Summary
-
Fields inherited from class org.jclouds.io.ContentMetadataBuilder
cacheControl, contentDisposition, contentEncoding, contentLanguage, contentLength, contentMD5, contentType, expires
-
Fields inherited from interface org.jclouds.io.ContentMetadata
HTTP_HEADERS, RFC1123_DATE_PATTERN
-
-
Constructor Summary
Constructors Constructor Description BaseMutableContentMetadata()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BaseMutableContentMetadatafromContentMetadata(ContentMetadata in)StringgetCacheControl()StringgetContentDisposition()Specifies presentational information for the object.StringgetContentEncoding()Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type header field.StringgetContentLanguage()Get Content Language of the payloadLonggetContentLength()Returns the total size of the payload, or the chunk that's available.byte[]getContentMD5()Deprecated.usegetContentMD5AsHashCode()instead.com.google.common.hash.HashCodegetContentMD5AsHashCode()StringgetContentType()A standard MIME type describing the format of the contents.DategetExpires()Gives the date/time after which the response is considered stale.voidsetCacheControl(String cacheControl)voidsetContentDisposition(String contentDisposition)Set Content Disposition of the payloadvoidsetContentEncoding(String contentEncoding)Set Content Encoding of the payloadvoidsetContentLanguage(String contentLanguage)Set Content Language of the payloadvoidsetContentLength(Long contentLength)voidsetContentMD5(byte[] md5)Deprecated.usesetContentMD5(HashCode)instead.voidsetContentMD5(com.google.common.hash.HashCode md5)voidsetContentType(String contentType)voidsetExpires(Date expires)BaseMutableContentMetadatatoBuilder()-
Methods inherited from class org.jclouds.io.ContentMetadataBuilder
build, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentLength, contentMD5, contentMD5, contentType, create, equals, expires, hashCode, toString
-
-
-
-
Method Detail
-
getCacheControl
public String getCacheControl()
- Specified by:
getCacheControlin interfaceContentMetadata
-
setCacheControl
public void setCacheControl(@Nullable String cacheControl)
- Specified by:
setCacheControlin interfaceMutableContentMetadata
-
getContentLength
public Long getContentLength()
Returns the total size of the payload, or the chunk that's available. Chunking is only used whenorg.jclouds.http.GetOptionsis called with options like tail, range, or startAt.- Specified by:
getContentLengthin interfaceContentMetadata- Returns:
- the length in bytes that can be be obtained from
#getInput() - See Also:
HttpHeaders.CONTENT_LENGTH,GetOptions
-
setContentLength
public void setContentLength(@Nullable Long contentLength)
- Specified by:
setContentLengthin interfaceMutableContentMetadata
-
getContentMD5
@Deprecated public byte[] getContentMD5()
Deprecated.usegetContentMD5AsHashCode()instead.- Specified by:
getContentMD5in interfaceContentMetadata
-
getContentMD5AsHashCode
public com.google.common.hash.HashCode getContentMD5AsHashCode()
- Specified by:
getContentMD5AsHashCodein interfaceContentMetadata
-
setContentMD5
@Deprecated public void setContentMD5(byte[] md5)
Deprecated.usesetContentMD5(HashCode)instead.- Specified by:
setContentMD5in interfaceMutableContentMetadata
-
setContentMD5
public void setContentMD5(com.google.common.hash.HashCode md5)
- Specified by:
setContentMD5in interfaceMutableContentMetadata
-
getContentType
public String getContentType()
A standard MIME type describing the format of the contents. If none is provided, the default is binary/octet-stream.- Specified by:
getContentTypein interfaceContentMetadata- See Also:
-
setContentType
public void setContentType(@Nullable String contentType)
- Specified by:
setContentTypein interfaceMutableContentMetadata
-
setContentDisposition
public void setContentDisposition(@Nullable String contentDisposition)
Set Content Disposition of the payload Not all providers may support it- Specified by:
setContentDispositionin interfaceMutableContentMetadata
-
getContentDisposition
public String getContentDisposition()
Specifies presentational information for the object.- Specified by:
getContentDispositionin interfaceContentMetadata- See Also:
-
setContentLanguage
public void setContentLanguage(@Nullable String contentLanguage)
Set Content Language of the payload Not all providers may support it- Specified by:
setContentLanguagein interfaceMutableContentMetadata
-
getContentLanguage
public String getContentLanguage()
Get Content Language of the payload Not all providers may support it- Specified by:
getContentLanguagein interfaceContentMetadata
-
setContentEncoding
public void setContentEncoding(@Nullable String contentEncoding)
Set Content Encoding of the payload Not all providers may support it- Specified by:
setContentEncodingin interfaceMutableContentMetadata
-
getContentEncoding
public String getContentEncoding()
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type header field.- Specified by:
getContentEncodingin interfaceContentMetadata- See Also:
-
setExpires
public void setExpires(@Nullable Date expires)
- Specified by:
setExpiresin interfaceMutableContentMetadata
-
getExpires
public Date getExpires()
Gives the date/time after which the response is considered stale.- Specified by:
getExpiresin interfaceContentMetadata- See Also:
-
toBuilder
public BaseMutableContentMetadata toBuilder()
- Specified by:
toBuilderin interfaceContentMetadata
-
fromContentMetadata
public static BaseMutableContentMetadata fromContentMetadata(ContentMetadata in)
-
-