Package org.jclouds.io.payloads
Class BaseImmutableContentMetadata
- java.lang.Object
-
- org.jclouds.io.payloads.BaseImmutableContentMetadata
-
- All Implemented Interfaces:
ContentMetadata
public class BaseImmutableContentMetadata extends Object implements ContentMetadata
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcacheControlprotected StringcontentDispositionprotected StringcontentEncodingprotected StringcontentLanguageprotected LongcontentLengthprotected com.google.common.hash.HashCodecontentMD5protected StringcontentTypeprotected Dateexpires-
Fields inherited from interface org.jclouds.io.ContentMetadata
HTTP_HEADERS, RFC1123_DATE_PATTERN
-
-
Constructor Summary
Constructors Constructor Description BaseImmutableContentMetadata(String contentType, Long contentLength, byte[] contentMD5, String contentDisposition, String contentLanguage, String contentEncoding, Date expires)Deprecated.BaseImmutableContentMetadata(String cacheControl, String contentType, Long contentLength, byte[] contentMD5, String contentDisposition, String contentLanguage, String contentEncoding, Date expires)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)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.inthashCode()ContentMetadataBuildertoBuilder()StringtoString()
-
-
-
Field Detail
-
cacheControl
protected String cacheControl
-
contentType
protected String contentType
-
contentLength
protected Long contentLength
-
contentMD5
protected com.google.common.hash.HashCode contentMD5
-
contentDisposition
protected String contentDisposition
-
contentLanguage
protected String contentLanguage
-
contentEncoding
protected String contentEncoding
-
expires
protected Date expires
-
-
Method Detail
-
getCacheControl
public String getCacheControl()
- Specified by:
getCacheControlin interfaceContentMetadata
-
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
-
getContentMD5
@Deprecated public byte[] getContentMD5()
Deprecated.usegetContentMD5AsHashCode()instead.- Specified by:
getContentMD5in interfaceContentMetadata
-
getContentMD5AsHashCode
public com.google.common.hash.HashCode getContentMD5AsHashCode()
- Specified by:
getContentMD5AsHashCodein interfaceContentMetadata
-
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:
-
getContentDisposition
public String getContentDisposition()
Specifies presentational information for the object.- Specified by:
getContentDispositionin interfaceContentMetadata- See Also:
-
getContentLanguage
public String getContentLanguage()
Get Content Language of the payload Not all providers may support it- Specified by:
getContentLanguagein interfaceContentMetadata
-
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:
-
getExpires
public Date getExpires()
Gives the date/time after which the response is considered stale.- Specified by:
getExpiresin interfaceContentMetadata- See Also:
-
toBuilder
public ContentMetadataBuilder toBuilder()
- Specified by:
toBuilderin interfaceContentMetadata
-
-