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 BaseMutableContentMetadata
fromContentMetadata(ContentMetadata in)
String
getCacheControl()
String
getContentDisposition()
Specifies presentational information for the object.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.String
getContentLanguage()
Get Content Language of the payloadLong
getContentLength()
Returns the total size of the payload, or the chunk that's available.byte[]
getContentMD5()
Deprecated.usegetContentMD5AsHashCode()
instead.com.google.common.hash.HashCode
getContentMD5AsHashCode()
String
getContentType()
A standard MIME type describing the format of the contents.Date
getExpires()
Gives the date/time after which the response is considered stale.void
setCacheControl(String cacheControl)
void
setContentDisposition(String contentDisposition)
Set Content Disposition of the payloadvoid
setContentEncoding(String contentEncoding)
Set Content Encoding of the payloadvoid
setContentLanguage(String contentLanguage)
Set Content Language of the payloadvoid
setContentLength(Long contentLength)
void
setContentMD5(byte[] md5)
Deprecated.usesetContentMD5(HashCode)
instead.void
setContentMD5(com.google.common.hash.HashCode md5)
void
setContentType(String contentType)
void
setExpires(Date expires)
BaseMutableContentMetadata
toBuilder()
-
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:
getCacheControl
in interfaceContentMetadata
-
setCacheControl
public void setCacheControl(@Nullable String cacheControl)
- Specified by:
setCacheControl
in 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.GetOptions
is called with options like tail, range, or startAt.- Specified by:
getContentLength
in 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:
setContentLength
in interfaceMutableContentMetadata
-
getContentMD5
@Deprecated public byte[] getContentMD5()
Deprecated.usegetContentMD5AsHashCode()
instead.- Specified by:
getContentMD5
in interfaceContentMetadata
-
getContentMD5AsHashCode
public com.google.common.hash.HashCode getContentMD5AsHashCode()
- Specified by:
getContentMD5AsHashCode
in interfaceContentMetadata
-
setContentMD5
@Deprecated public void setContentMD5(byte[] md5)
Deprecated.usesetContentMD5(HashCode)
instead.- Specified by:
setContentMD5
in interfaceMutableContentMetadata
-
setContentMD5
public void setContentMD5(com.google.common.hash.HashCode md5)
- Specified by:
setContentMD5
in 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:
getContentType
in interfaceContentMetadata
- See Also:
-
setContentType
public void setContentType(@Nullable String contentType)
- Specified by:
setContentType
in interfaceMutableContentMetadata
-
setContentDisposition
public void setContentDisposition(@Nullable String contentDisposition)
Set Content Disposition of the payload Not all providers may support it- Specified by:
setContentDisposition
in interfaceMutableContentMetadata
-
getContentDisposition
public String getContentDisposition()
Specifies presentational information for the object.- Specified by:
getContentDisposition
in interfaceContentMetadata
- See Also:
-
setContentLanguage
public void setContentLanguage(@Nullable String contentLanguage)
Set Content Language of the payload Not all providers may support it- Specified by:
setContentLanguage
in interfaceMutableContentMetadata
-
getContentLanguage
public String getContentLanguage()
Get Content Language of the payload Not all providers may support it- Specified by:
getContentLanguage
in interfaceContentMetadata
-
setContentEncoding
public void setContentEncoding(@Nullable String contentEncoding)
Set Content Encoding of the payload Not all providers may support it- Specified by:
setContentEncoding
in 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:
getContentEncoding
in interfaceContentMetadata
- See Also:
-
setExpires
public void setExpires(@Nullable Date expires)
- Specified by:
setExpires
in interfaceMutableContentMetadata
-
getExpires
public Date getExpires()
Gives the date/time after which the response is considered stale.- Specified by:
getExpires
in interfaceContentMetadata
- See Also:
-
toBuilder
public BaseMutableContentMetadata toBuilder()
- Specified by:
toBuilder
in interfaceContentMetadata
-
fromContentMetadata
public static BaseMutableContentMetadata fromContentMetadata(ContentMetadata in)
-
-