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 -
Method Summary
Modifier and TypeMethodDescriptionstatic BaseMutableContentMetadata
Specifies presentational information for the object.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.Get Content Language of the payloadReturns the total size of the payload, or the chunk that's available.byte[]
Deprecated.com.google.common.hash.HashCode
A standard MIME type describing the format of the contents.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) Methods inherited from class org.jclouds.io.ContentMetadataBuilder
build, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentLength, contentMD5, contentMD5, contentType, create, equals, expires, hashCode, toString
-
Constructor Details
-
BaseMutableContentMetadata
public BaseMutableContentMetadata()
-
-
Method Details
-
getCacheControl
- Specified by:
getCacheControl
in interfaceContentMetadata
-
setCacheControl
- Specified by:
setCacheControl
in interfaceMutableContentMetadata
-
getContentLength
Returns the total size of the payload, or the chunk that's available. Chunking is only used wheninvalid reference
org.jclouds.http.GetOptions
- Specified by:
getContentLength
in interfaceContentMetadata
- Returns:
- the length in bytes that can be be obtained from
invalid reference
#getInput()
- See Also:
-
setContentLength
- Specified by:
setContentLength
in interfaceMutableContentMetadata
-
getContentMD5
Deprecated.usegetContentMD5AsHashCode()
instead.- Specified by:
getContentMD5
in interfaceContentMetadata
-
getContentMD5AsHashCode
public com.google.common.hash.HashCode getContentMD5AsHashCode()- Specified by:
getContentMD5AsHashCode
in interfaceContentMetadata
-
setContentMD5
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
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
- Specified by:
setContentType
in interfaceMutableContentMetadata
-
setContentDisposition
Set Content Disposition of the payload Not all providers may support it- Specified by:
setContentDisposition
in interfaceMutableContentMetadata
- Parameters:
contentDisposition
-
-
getContentDisposition
Specifies presentational information for the object.- Specified by:
getContentDisposition
in interfaceContentMetadata
- See Also:
-
setContentLanguage
Set Content Language of the payload Not all providers may support it- Specified by:
setContentLanguage
in interfaceMutableContentMetadata
- Parameters:
contentLanguage
-
-
getContentLanguage
Get Content Language of the payload Not all providers may support it- Specified by:
getContentLanguage
in interfaceContentMetadata
-
setContentEncoding
Set Content Encoding of the payload Not all providers may support it- Specified by:
setContentEncoding
in interfaceMutableContentMetadata
- Parameters:
contentEncoding
-
-
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
- Specified by:
setExpires
in interfaceMutableContentMetadata
-
getExpires
Gives the date/time after which the response is considered stale.- Specified by:
getExpires
in interfaceContentMetadata
- See Also:
-
toBuilder
- Specified by:
toBuilder
in interfaceContentMetadata
-
fromContentMetadata
-
getContentMD5AsHashCode()
instead.