public class GetOptions extends BaseHttpRequestOptions
import static org.jclouds.http.options.GetOptions.Builder.*
// this will get the first megabyte of an object.
blob = client.get("objectName",range(0,1024));
Modifier and Type | Class and Description |
---|---|
static class |
GetOptions.Builder |
Modifier and Type | Field and Description |
---|---|
static GetOptions |
NONE |
formParameters, headers, matrixParameters, pathSuffix, payload, queryParameters
Constructor and Description |
---|
GetOptions() |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.Multimap<String,String> |
buildRequestHeaders()
Builds headers representing options.
|
boolean |
equals(Object obj) |
String |
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).
|
String |
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).
|
String |
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).
|
String |
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).
|
String |
getRange()
For use in the header Range
|
List<String> |
getRanges() |
int |
hashCode() |
GetOptions |
ifETagDoesntMatch(String eTag)
The object should not have a eTag hash corresponding with the parameter
eTag . |
GetOptions |
ifETagMatches(String eTag)
The object's eTag hash should match the parameter
eTag . |
GetOptions |
ifModifiedSince(Date ifModifiedSince)
Only return the object if it has changed since this time.
|
GetOptions |
ifUnmodifiedSince(Date ifUnmodifiedSince)
Only return the object if it hasn't changed since this time.
|
GetOptions |
range(long start,
long end)
download the specified range of the object.
|
GetOptions |
startAt(long start)
download the object offset at
start |
GetOptions |
tail(long count)
download the last
count bytes of the object |
String |
toString() |
buildFormParameters, buildMatrixParameters, buildPathSuffix, buildQueryParameters, buildStringPayload, getFirstFormOrNull, getFirstHeaderOrNull, getFirstMatrixOrNull, getFirstQueryOrNull, replaceHeader
public static final GetOptions NONE
public com.google.common.collect.Multimap<String,String> buildRequestHeaders()
BaseHttpRequestOptions
buildRequestHeaders
in interface HttpRequestOptions
buildRequestHeaders
in class BaseHttpRequestOptions
public GetOptions range(long start, long end)
public GetOptions startAt(long start)
start
public GetOptions tail(long count)
count
bytes of the objectpublic String getRange()
range(long, long)
public GetOptions ifModifiedSince(Date ifModifiedSince)
ifETagMatches(String)
or ifUnmodifiedSince(Date)
public String getIfModifiedSince()
ifModifiedSince(Date)
public GetOptions ifUnmodifiedSince(Date ifUnmodifiedSince)
ifETagDoesntMatch(String)
or ifModifiedSince(Date)
public String getIfUnmodifiedSince()
ifUnmodifiedSince(Date)
public GetOptions ifETagMatches(String eTag)
eTag
.
Not compatible with #ifETagDoesntMatch(byte[])
or ifModifiedSince(Date)
eTag
- hash representing the payloadpublic String getIfMatch()
ifETagMatches(String)
public GetOptions ifETagDoesntMatch(String eTag)
eTag
.
Not compatible with ifETagMatches(String)
or ifUnmodifiedSince(Date)
eTag
- hash representing the payloadpublic String getIfNoneMatch()
ifETagDoesntMatch(String)
public int hashCode()
hashCode
in class BaseHttpRequestOptions
public boolean equals(Object obj)
equals
in class BaseHttpRequestOptions
public String toString()
toString
in class BaseHttpRequestOptions
Copyright © 2009-2013 jclouds. All Rights Reserved.