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 String
cacheControl
protected String
contentDisposition
protected String
contentEncoding
protected String
contentLanguage
protected Long
contentLength
protected com.google.common.hash.HashCode
contentMD5
protected String
contentType
protected Date
expires
-
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 boolean
equals(Object obj)
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.int
hashCode()
ContentMetadataBuilder
toBuilder()
String
toString()
-
-
-
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:
getCacheControl
in 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.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
-
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
-
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:
-
getContentDisposition
public String getContentDisposition()
Specifies presentational information for the object.- Specified by:
getContentDisposition
in interfaceContentMetadata
- See Also:
-
getContentLanguage
public String getContentLanguage()
Get Content Language of the payload Not all providers may support it- Specified by:
getContentLanguage
in 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:
getContentEncoding
in interfaceContentMetadata
- See Also:
-
getExpires
public Date getExpires()
Gives the date/time after which the response is considered stale.- Specified by:
getExpires
in interfaceContentMetadata
- See Also:
-
toBuilder
public ContentMetadataBuilder toBuilder()
- Specified by:
toBuilder
in interfaceContentMetadata
-
-