org.jclouds.io
Interface ContentMetadata

All Known Subinterfaces:
MutableContentMetadata
All Known Implementing Classes:
BaseImmutableContentMetadata, BaseMutableContentMetadata

public interface ContentMetadata

Author:
Adrian Cole

Field Summary
static Set<String> HTTP_HEADERS
           
static String RFC1123_DATE_PATTERN
           
 
Method Summary
 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 payload

Not all providers may support it

 Long getContentLength()
          Returns the total size of the payload, or the chunk that's available.
 byte[] getContentMD5()
           
 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.
 ContentMetadataBuilder toBuilder()
           
 

Field Detail

HTTP_HEADERS

static final Set<String> HTTP_HEADERS

RFC1123_DATE_PATTERN

static final String RFC1123_DATE_PATTERN
See Also:
Constant Field Values
Method Detail

getContentLength

@Nullable
Long getContentLength()
Returns the total size of the payload, or the chunk that's available.

Chunking is only used when org.jclouds.http.GetOptions is called with options like tail, range, or startAt.

Returns:
the length in bytes that can be be obtained from #getInput()
See Also:
HttpHeaders.CONTENT_LENGTH, GetOptions

getContentDisposition

@Nullable
String getContentDisposition()
Specifies presentational information for the object.

See Also:

getContentEncoding

@Nullable
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.

See Also:

getContentType

@Nullable
String getContentType()
A standard MIME type describing the format of the contents. If none is provided, the default is binary/octet-stream.

See Also:

getContentMD5

@Nullable
byte[] getContentMD5()

getContentLanguage

@Nullable
String getContentLanguage()
Get Content Language of the payload

Not all providers may support it


getExpires

@Nullable
Date getExpires()
Gives the date/time after which the response is considered stale.

Throws:
IllegalStateException - If the Expires header is non-null, and not a valid RFC 1123 date
See Also:

toBuilder

ContentMetadataBuilder toBuilder()


Copyright © 2009-2013 jclouds. All Rights Reserved.