Package org.jclouds.http.options
Class GetOptions
java.lang.Object
org.jclouds.http.options.BaseHttpRequestOptions
org.jclouds.http.options.GetOptions
- All Implemented Interfaces:
HttpRequestOptions
- Direct Known Subclasses:
GetObjectOptions
Contains options supported for HTTP GET operations.
Usage
The recommended way to instantiate a GetObjectOptions object is to statically import GetObjectOptions.Builder.* and invoke a static creation method followed by an instance mutator (if needed):
import static org.jclouds.http.options.GetOptions.Builder.*
// this will get the first megabyte of an object.
blob = client.get("objectName",range(0,1024));
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, pathSuffix, payload, queryParameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds headers representing options.boolean
For use in the request header: If-MatchFor use in the header If-Modified-SinceFor use in the request header: If-None-MatchFor use in the header If-Unmodified-SincegetRange()
For use in the header Rangeint
hashCode()
ifETagDoesntMatch
(String eTag) The object should not have a eTag hash corresponding with the parametereTag
.ifETagMatches
(String eTag) The object's eTag hash should match the parametereTag
.ifModifiedSince
(Date ifModifiedSince) Only return the object if it has changed since this time.ifUnmodifiedSince
(Date ifUnmodifiedSince) Only return the object if it hasn't changed since this time.range
(long start, long end) download the specified range of the object.startAt
(long start) download the object offset atstart
tail
(long count) download the lastcount
bytes of the objecttoString()
Methods inherited from class org.jclouds.http.options.BaseHttpRequestOptions
buildFormParameters, buildPathSuffix, buildQueryParameters, buildStringPayload, getFirstFormOrNull, getFirstHeaderOrNull, getFirstQueryOrNull, replaceHeader
-
Field Details
-
NONE
-
-
Constructor Details
-
GetOptions
public GetOptions()
-
-
Method Details
-
buildRequestHeaders
Description copied from class:BaseHttpRequestOptions
Builds headers representing options.- Specified by:
buildRequestHeaders
in interfaceHttpRequestOptions
- Overrides:
buildRequestHeaders
in classBaseHttpRequestOptions
- Returns:
- multimap that may contain headers.
-
range
download the specified range of the object. -
startAt
download the object offset atstart
-
tail
download the lastcount
bytes of the object -
getRange
For use in the header Range- See Also:
-
ifModifiedSince
Only return the object if it has changed since this time. Not compatible withifETagMatches(String)
orifUnmodifiedSince(Date)
-
getIfModifiedSince
For use in the header If-Modified-Since Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).- See Also:
-
ifUnmodifiedSince
Only return the object if it hasn't changed since this time. Not compatible withifETagDoesntMatch(String)
orifModifiedSince(Date)
-
getIfUnmodifiedSince
For use in the header If-Unmodified-Since Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).- See Also:
-
ifETagMatches
The object's eTag hash should match the parametereTag
. Not compatible withinvalid reference
#ifETagDoesntMatch(byte[])
ifModifiedSince(Date)
- Parameters:
eTag
- hash representing the payload
-
getIfMatch
For use in the request header: If-Match Return the object only if its payload tag (ETag) is the same as the eTag specified, otherwise return a 412 (precondition failed).- See Also:
-
ifETagDoesntMatch
The object should not have a eTag hash corresponding with the parametereTag
. Not compatible withifETagMatches(String)
orifUnmodifiedSince(Date)
- Parameters:
eTag
- hash representing the payload
-
getIfNoneMatch
For use in the request header: If-None-Match Return the object only if its payload tag (ETag) is different from the one specified, otherwise return a 304 (not modified).- See Also:
-
getRanges
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBaseHttpRequestOptions
-
equals
- Overrides:
equals
in classBaseHttpRequestOptions
-
toString
- Overrides:
toString
in classBaseHttpRequestOptions
-