public class PresignedUrlDownloadRequest extends AmazonWebServiceRequest implements Serializable
AmazonWebServiceRequest.putCustomRequestHeader(String, String)
method. If any signed headers or parameters are missing from the request, a Signature mismatch error will be thrown from S3.
Ensure you set all the custom headers/parameters that are used for creating the presigned url.NOOP
Constructor and Description |
---|
PresignedUrlDownloadRequest(URL presignedUrl) |
Modifier and Type | Method and Description |
---|---|
PresignedUrlDownloadRequest |
clone()
Creates and returns a new copy of the request.
|
List<String> |
getMatchingETagConstraints()
Gets the optional list of ETag constraints that, when present, must
include a match for the object's current ETag in order for this
request to be executed.
|
URL |
getPresignedUrl() |
long[] |
getRange()
Gets the optional inclusive byte range within the desired object
that will be downloaded by this request.
|
void |
setMatchingETagConstraints(List<String> etagList)
Sets the optional list of ETag constraints for this request.
|
void |
setPresignedUrl(URL presignedUrl) |
void |
setRange(long start,
long end)
Sets the optional inclusive byte range within the desired object that
will be downloaded by this request.
|
PresignedUrlDownloadRequest |
withMatchingETagConstraint(String etag)
Sets a single ETag constraint to this request.
|
PresignedUrlDownloadRequest |
withPresignedUrl(URL presignedUrl) |
PresignedUrlDownloadRequest |
withRange(long start,
long end)
Sets the optional inclusive byte range within the desired object that
will be downloaded by this request.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public PresignedUrlDownloadRequest(URL presignedUrl)
public URL getPresignedUrl()
public void setPresignedUrl(URL presignedUrl)
presignedUrl
- sets the presigned url to send the request topublic PresignedUrlDownloadRequest withPresignedUrl(URL presignedUrl)
presignedUrl
- sets the presigned url to send the request topublic long[] getRange()
Gets the optional inclusive byte range within the desired object that will be downloaded by this request.
The range is returned as
a two element array, containing the start and end index of the byte range.
If no byte range has been specified, the entire object is downloaded and
this method returns null
.
null
if no range has been specified,
and the whole object is
to be downloaded.setRange(long, long)
public void setRange(long start, long end)
Sets the optional inclusive byte range within the desired object that will be downloaded by this request.
The first byte in an object has position 0; as an example, the first ten bytes of an object can be downloaded by specifying a range of 0 to 9.
If no byte range is specified, this request downloads the entire object from Amazon S3.
start
- The start of the inclusive byte range to download.end
- The end of the inclusive byte range to download.getRange()
public PresignedUrlDownloadRequest withRange(long start, long end)
Sets the optional inclusive byte range within the desired object that
will be downloaded by this request.
Returns this GetObjectRequest
, enabling additional method
calls to be chained together.
The first byte in an object has position 0; as an example, the first ten bytes of an object can be downloaded by specifying a range of 0 to 9.
If no byte range is specified, this request downloads the entire object from Amazon S3.
start
- The start of the inclusive byte range to download.end
- The end of the inclusive byte range to download.GetObjectRequest
, enabling additional method
calls to be chained together.getRange()
,
setRange(long, long)
public List<String> getMatchingETagConstraints()
setMatchingETagConstraints(List)
,
withMatchingETagConstraint(String)
public void setMatchingETagConstraints(List<String> etagList)
etagList
- The list of ETags to constrain this request.getMatchingETagConstraints()
,
withMatchingETagConstraint(String)
public PresignedUrlDownloadRequest withMatchingETagConstraint(String etag)
PresignedUrlDownloadRequest
, enabling additional method
calls to be chained together.
Multiple ETag constraints can be added to a request, but one must match the object's current ETag in order for this request to be executed. If none of the ETag constraints added to this request match the object's current ETag, this request will not be executed by Amazon S3.
etag
- The matching ETag constraint to add to this request.PresignedUrlDownloadRequest
, enabling additional method
calls to be chained together.getMatchingETagConstraints()
,
setMatchingETagConstraints(List)
public PresignedUrlDownloadRequest clone()
AmazonWebServiceRequest
class.clone
in class AmazonWebServiceRequest
Object.clone()