Class GetObjectRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.s3.model.GetObjectRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,SSECustomerKeyProvider
,Serializable
,Cloneable
- Direct Known Subclasses:
EncryptedGetObjectRequest
public class GetObjectRequest extends AmazonWebServiceRequest implements SSECustomerKeyProvider, Serializable
Provides options for downloading an Amazon S3 object.
All
GetObjectRequests
must specify a bucket name and key. Beyond that, requests can also specify:- The range of bytes within the object to download,
- Constraints controlling if the object will be downloaded or not.
If you are uploading or accessing KMS-encrypted objects, you need to specify the correct region of the bucket on your client and configure AWS Signature Version 4 for added security. For more information on how to do this, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify -signature-version
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description GetObjectRequest(S3ObjectId s3ObjectId)
GetObjectRequest(String bucketName, String key)
Constructs a newGetObjectRequest
with all the required parameters.GetObjectRequest(String bucketName, String key, boolean isRequesterPays)
Constructs a newGetObjectRequest
with all the required parameters.GetObjectRequest(String bucketName, String key, String versionId)
Constructs a newGetObjectRequest
with all the required parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getBucketName()
Gets the name of the bucket containing the object to be downloaded.String
getKey()
Gets the key under which the object to be downloaded is stored.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.Date
getModifiedSinceConstraint()
Gets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.List<String>
getNonmatchingETagConstraints()
Gets the optional list of ETag constraints that when present, must not include a match for the object's current ETag in order for this request to be executed.Integer
getPartNumber()
Returns the optional part number that indicates the part to be downloaded in a multipart object.ProgressListener
getProgressListener()
Deprecated.useAmazonWebServiceRequest.getGeneralProgressListener()
instead.long[]
getRange()
Gets the optional inclusive byte range within the desired object that will be downloaded by this request.ResponseHeaderOverrides
getResponseHeaders()
Returns the headers to be overridden in the service response.S3ObjectId
getS3ObjectId()
Returns an immutable S3 object id.SSECustomerKey
getSSECustomerKey()
Returns the optional customer-provided server-side encryption key to use to encrypt the uploaded object.Date
getUnmodifiedSinceConstraint()
Gets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.String
getVersionId()
Gets the optional version ID specifying which version of the object to download.boolean
isRequesterPays()
Returns true if the user has enabled Requester Pays option when downloading an object from Requester Pays Bucket; else false.void
setBucketName(String bucketName)
Sets the name of the bucket containing the object to be downloaded.void
setKey(String key)
Sets the key under which the object to be downloaded is stored.void
setMatchingETagConstraints(List<String> eTagList)
Sets 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.void
setModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.void
setNonmatchingETagConstraints(List<String> eTagList)
Sets the optional list of ETag constraints that when present must not include a match for the object's current ETag in order for this request to be executed.void
setPartNumber(Integer partNumber)
Sets the optional part number that indicates the part to be downloaded in a multipart object.void
setProgressListener(ProgressListener progressListener)
Deprecated.void
setRange(long start)
Sets the optional inclusive start range within the desired object that the rest of which will be downloaded by this request.void
setRange(long start, long end)
Sets the optional inclusive byte range within the desired object that will be downloaded by this request.void
setRequesterPays(boolean isRequesterPays)
Used for downloading an Amazon S3 Object from a Requester Pays Bucket.void
setResponseHeaders(ResponseHeaderOverrides responseHeaders)
Sets the headers to be overridden in the service response.void
setS3ObjectId(S3ObjectId s3ObjectId)
Sets the S3 object id for this request.void
setSSECustomerKey(SSECustomerKey sseKey)
Sets the optional customer-provided server-side encryption key to use to decrypt this object.void
setUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.void
setVersionId(String versionId)
Sets the optional version ID specifying which version of the object to download.GetObjectRequest
withBucketName(String bucketName)
Sets the name of the bucket containing the object to be downloaded.GetObjectRequest
withKey(String key)
Sets the key under which the object to be downloaded is stored.GetObjectRequest
withMatchingETagConstraint(String eTag)
Sets a single ETag constraint to this request.GetObjectRequest
withModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.GetObjectRequest
withNonmatchingETagConstraint(String eTag)
Sets a single ETag constraint to this request.GetObjectRequest
withPartNumber(Integer partNumber)
Sets the optional part number that indicates the part to be downloaded in a multipart object.GetObjectRequest
withProgressListener(ProgressListener progressListener)
Deprecated.GetObjectRequest
withRange(long start)
Sets the optional inclusive start range within the desired object that the rest of which will be downloaded by this request.GetObjectRequest
withRange(long start, long end)
Sets the optional inclusive byte range within the desired object that will be downloaded by this request.GetObjectRequest
withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.GetObjectRequest
withResponseHeaders(ResponseHeaderOverrides responseHeaders)
Sets the headers to be overridden in the service response and returns this object, for method chaining.GetObjectRequest
withS3ObjectId(S3ObjectId s3ObjectId)
Fluent API to set the S3 object id for this request.GetObjectRequest
withSSECustomerKey(SSECustomerKey sseKey)
Sets the optional customer-provided server-side encryption key to use to decrypt this object, and returns the updated GetObjectRequest so that additional method calls may be chained together.GetObjectRequest
withUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.GetObjectRequest
withVersionId(String versionId)
Sets the optional version ID specifying which version of the object to download and returns this object, enabling additional method calls to be chained together.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Constructor Detail
-
GetObjectRequest
public GetObjectRequest(String bucketName, String key)
Constructs a newGetObjectRequest
with all the required parameters.- Parameters:
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the object is stored.- See Also:
GetObjectRequest(String, String, String)
,GetObjectRequest(String, String, boolean)
-
GetObjectRequest
public GetObjectRequest(String bucketName, String key, String versionId)
Constructs a newGetObjectRequest
with all the required parameters.- Parameters:
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the object is stored.versionId
- The Amazon S3 version ID specifying a specific version of the object to download.- See Also:
GetObjectRequest(String, String)
,GetObjectRequest(String, String, boolean)
-
GetObjectRequest
public GetObjectRequest(S3ObjectId s3ObjectId)
-
GetObjectRequest
public GetObjectRequest(String bucketName, String key, boolean isRequesterPays)
Constructs a newGetObjectRequest
with all the required parameters.- Parameters:
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the object is stored.isRequesterPays
- If enabled, the requester is charged for downloading the data from Requester Pays Buckets.- See Also:
GetObjectRequest(String, String)
,GetObjectRequest(String, String, String)
-
-
Method Detail
-
getBucketName
public String getBucketName()
Gets the name of the bucket containing the object to be downloaded.- Returns:
- The name of the bucket containing the object to be downloaded.
- See Also:
setBucketName(String)
,withBucketName(String)
-
setBucketName
public void setBucketName(String bucketName)
Sets the name of the bucket containing the object to be downloaded.- Parameters:
bucketName
- The name of the bucket containing the object to be downloaded.- See Also:
getBucketName()
,withBucketName(String)
-
withBucketName
public GetObjectRequest withBucketName(String bucketName)
Sets the name of the bucket containing the object to be downloaded. Returns thisGetObjectRequest
, enabling additional method calls to be chained together.- Parameters:
bucketName
- The name of the bucket containing the object to be downloaded.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
getBucketName()
,setBucketName(String)
-
getKey
public String getKey()
Gets the key under which the object to be downloaded is stored.- Returns:
- The key under which the object to be downloaded is stored.
- See Also:
setKey(String)
,withKey(String)
-
setKey
public void setKey(String key)
Sets the key under which the object to be downloaded is stored.- Parameters:
key
- The key under which the object to be downloaded is stored.- See Also:
getKey()
,withKey(String)
-
withKey
public GetObjectRequest withKey(String key)
Sets the key under which the object to be downloaded is stored. Returns thisGetObjectRequest
, enabling additional method calls to be chained together.- Parameters:
key
- The key under which the object to be downloaded is stored.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
getKey()
,setKey(String)
-
getVersionId
public String getVersionId()
Gets the optional version ID specifying which version of the object to download. If not specified, the most recent version will be downloaded.
Objects created before versioning was enabled or when versioning is suspended are given the default
null
version ID (seeConstants.NULL_VERSION_ID
). Note that thenull
version ID is a valid version ID and is not the same as not having a version ID.For more information about enabling versioning for a bucket, see
AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.- Returns:
- The optional version ID specifying which version of the object to download. If not specified, the most recent version will be downloaded.
- See Also:
setVersionId(String)
,withVersionId(String)
-
setVersionId
public void setVersionId(String versionId)
Sets the optional version ID specifying which version of the object to download. If not specified, the most recent version will be downloaded.Objects created before versioning was enabled or when versioning is suspended will be given the default
null
version ID (seeConstants.NULL_VERSION_ID
). Note that thenull
version ID is a valid version ID and is not the same as not having a version ID.For more information about enabling versioning for a bucket, see
AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.- Parameters:
versionId
- The optional version ID specifying which version of the object to download.- See Also:
getVersionId()
,withVersionId(String)
-
withVersionId
public GetObjectRequest withVersionId(String versionId)
Sets the optional version ID specifying which version of the object to download and returns this object, enabling additional method calls to be chained together. If not specified, the most recent version will be downloaded.
Objects created before versioning was enabled or when versioning is suspended will be given the default or
null
version ID (seeConstants.NULL_VERSION_ID
). Note that thenull
version ID is a valid version ID and is not the same as not having a version ID.For more information about enabling versioning for a bucket, see
AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
.- Parameters:
versionId
- The optional version ID specifying which version of the object to download.- Returns:
- The updated request object, enabling additional method calls to be chained together.
- See Also:
getVersionId()
,setVersionId(String)
-
getRange
public 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
.- Returns:
- A two element array indicating the inclusive start index and end index
within the object being downloaded by this request.
Returns
null
if no range has been specified, and the whole object is to be downloaded. - See Also:
setRange(long, long)
,withRange(long, long)
-
setRange
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.
- Parameters:
start
- The start of the inclusive byte range to download.end
- The end of the inclusive byte range to download.- See Also:
getRange()
,withRange(long, long)
-
setRange
public void setRange(long start)
Sets the optional inclusive start range within the desired object that the rest of which will be downloaded by this request.
The first byte in an object has position 0; as an example, the object is of 10 bytes in length, the last 4 bytes can be downloaded by specifying the start range as 6.
If no byte range is specified, this request downloads the entire object from Amazon S3.
- Parameters:
start
- The start of the inclusive byte range to download.- See Also:
setRange(long, long)
,withRange(long)
-
withRange
public GetObjectRequest 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.
- Parameters:
start
- The start of the inclusive byte range to download.end
- The end of the inclusive byte range to download.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
getRange()
,setRange(long, long)
-
withRange
public GetObjectRequest withRange(long start)
Sets the optional inclusive start range within the desired object that the rest of which will be downloaded by this request.
Returns thisGetObjectRequest
, enabling additional method calls to be chained together.The first byte in an object has position 0; as an example, the object is of 10 bytes in length, the last 4 bytes can be downloaded by specifying the start range as 6.
If no byte range is specified, this request downloads the entire object from Amazon S3.
- Parameters:
start
- The start of the inclusive byte range to download.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
withRange(long, long)
,setRange(long)
-
getMatchingETagConstraints
public 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. Only one ETag in the list needs to match for this request to be executed by Amazon S3.- Returns:
- 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.
- See Also:
setMatchingETagConstraints(List)
,withMatchingETagConstraint(String)
-
setMatchingETagConstraints
public void setMatchingETagConstraints(List<String> eTagList)
Sets 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. If none of the specified ETags match the object's current ETag, this request will not be executed. Only one ETag in the list needs to match for the request to be executed by Amazon S3.- Parameters:
eTagList
- The optional list of ETag constraints that must include a match for the object's current ETag in order for this request to be executed.- See Also:
getMatchingETagConstraints()
,withMatchingETagConstraint(String)
-
withMatchingETagConstraint
public GetObjectRequest withMatchingETagConstraint(String eTag)
Sets a single ETag constraint to this request. Returns thisGetObjectRequest
, 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.
- Parameters:
eTag
- The matching ETag constraint to add to this request.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
getMatchingETagConstraints()
,setMatchingETagConstraints(List)
-
getNonmatchingETagConstraints
public List<String> getNonmatchingETagConstraints()
Gets the optional list of ETag constraints that when present, must not include a match for the object's current ETag in order for this request to be executed. If any entry in the non-matching ETag constraint list matches the object's current ETag, this request will not be executed by Amazon S3.- Returns:
- The optional list of ETag constraints that when present, must not include a match for the object's current ETag in order for this request to be executed.
- See Also:
setNonmatchingETagConstraints(List)
,withNonmatchingETagConstraint(String)
-
setNonmatchingETagConstraints
public void setNonmatchingETagConstraints(List<String> eTagList)
Sets the optional list of ETag constraints that when present must not include a match for the object's current ETag in order for this request to be executed. If any entry in the non-matching ETag constraint list matches the object's current ETag, this request will not be executed by Amazon S3.- Parameters:
eTagList
- The list of ETag constraints that, when present, must not include a match for the object's current ETag in order for this request to be executed.- See Also:
getNonmatchingETagConstraints()
,withNonmatchingETagConstraint(String)
-
withNonmatchingETagConstraint
public GetObjectRequest withNonmatchingETagConstraint(String eTag)
Sets a single ETag constraint to this request. Returns thisGetObjectRequest
, enabling additional method calls to be chained together.Multiple ETag constraints can be added to a request, but all ETag constraints must not match the object's current ETag in order for this request to be executed. If any entry in the non-matching ETag constraint list matches the object's current ETag, this request will not be executed by Amazon S3.
- Parameters:
eTag
- The non-matching ETag constraint to add to this request.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
getNonmatchingETagConstraints()
,setNonmatchingETagConstraints(List)
-
getUnmodifiedSinceConstraint
public Date getUnmodifiedSinceConstraint()
Gets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.- Returns:
- The optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.
- See Also:
setUnmodifiedSinceConstraint(Date)
,withUnmodifiedSinceConstraint(Date)
-
setUnmodifiedSinceConstraint
public void setUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.Note that Amazon S3 will ignore any dates occurring in the future.
- Parameters:
date
- The unmodified constraint that restricts this request to executing only if the object has not been modified after this date.- See Also:
getUnmodifiedSinceConstraint()
,withUnmodifiedSinceConstraint(Date)
-
withUnmodifiedSinceConstraint
public GetObjectRequest withUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date. Returns thisGetObjectRequest
, enabling additional method calls to be chained together.Note that Amazon S3 will ignore any dates occurring in the future.
- Parameters:
date
- The unmodified constraint that restricts this request to executing only if the object has not been modified after this date.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
getUnmodifiedSinceConstraint()
,setUnmodifiedSinceConstraint(Date)
-
getModifiedSinceConstraint
public Date getModifiedSinceConstraint()
Gets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.- Returns:
- The optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.
- See Also:
setModifiedSinceConstraint(Date)
,withModifiedSinceConstraint(Date)
-
setModifiedSinceConstraint
public void setModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.Note that Amazon S3 will ignore any dates occurring in the future.
- Parameters:
date
- The modified constraint that restricts this request to executing only if the object has been modified after the specified date.- See Also:
getModifiedSinceConstraint()
,withModifiedSinceConstraint(Date)
-
withModifiedSinceConstraint
public GetObjectRequest withModifiedSinceConstraint(Date date)
Sets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date. Returns thisGetObjectRequest
, enabling additional method calls to be chained together.Note that Amazon S3 will ignore any dates occurring in the future.
- Parameters:
date
- The modified constraint that restricts this request to executing only if the object has been modified after the specified date.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
getModifiedSinceConstraint()
,setModifiedSinceConstraint(Date)
-
getResponseHeaders
public ResponseHeaderOverrides getResponseHeaders()
Returns the headers to be overridden in the service response.- Returns:
- the headers to be overridden in the service response.
-
setResponseHeaders
public void setResponseHeaders(ResponseHeaderOverrides responseHeaders)
Sets the headers to be overridden in the service response.- Parameters:
responseHeaders
- The headers to be overridden in the service response.
-
withResponseHeaders
public GetObjectRequest withResponseHeaders(ResponseHeaderOverrides responseHeaders)
Sets the headers to be overridden in the service response and returns this object, for method chaining.- Parameters:
responseHeaders
- The headers to be overridden in the service response.- Returns:
- This
GetObjectRequest
for method chaining.
-
setProgressListener
@Deprecated public void setProgressListener(ProgressListener progressListener)
Deprecated.Sets the optional progress listener for receiving updates about object download status.- Parameters:
progressListener
- The legacy progress listener that is used exclusively for Amazon S3 client.
-
getProgressListener
@Deprecated public ProgressListener getProgressListener()
Deprecated.useAmazonWebServiceRequest.getGeneralProgressListener()
instead.Returns the optional progress listener for receiving updates about object download status.- Returns:
- the optional progress listener for receiving updates about object download status.
-
withProgressListener
@Deprecated public GetObjectRequest withProgressListener(ProgressListener progressListener)
Deprecated.Sets the optional progress listener for receiving updates about object download status, and returns this updated object so that additional method calls can be chained together.- Parameters:
progressListener
- The legacy progress listener that is used exclusively for Amazon S3 client.- Returns:
- This updated GetObjectRequest object.
-
isRequesterPays
public boolean isRequesterPays()
Returns true if the user has enabled Requester Pays option when downloading an object from Requester Pays Bucket; else false.If a bucket is enabled for Requester Pays, then any attempt to read an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket
- Returns:
- true if the user has enabled Requester Pays option for downloading an object from Requester Pays Bucket.
-
setRequesterPays
public void setRequesterPays(boolean isRequesterPays)
Used for downloading an Amazon S3 Object from a Requester Pays Bucket. If set the requester is charged for downloading the data from the bucket.If a bucket is enabled for Requester Pays, then any attempt to read an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket
- Parameters:
isRequesterPays
- Enable Requester Pays option for the operation.
-
withRequesterPays
public GetObjectRequest withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket. It returns this updated GetObjectRequest object so that additional method calls can be chained together.If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket.
- Parameters:
isRequesterPays
- Enable Requester Pays option for the operation.- Returns:
- The updated GetObjectRequest object.
-
getSSECustomerKey
public SSECustomerKey getSSECustomerKey()
Description copied from interface:SSECustomerKeyProvider
Returns the optional customer-provided server-side encryption key to use to encrypt the uploaded object.- Specified by:
getSSECustomerKey
in interfaceSSECustomerKeyProvider
- Returns:
- The optional customer-provided server-side encryption key to use to encrypt the uploaded object.
-
setSSECustomerKey
public void setSSECustomerKey(SSECustomerKey sseKey)
Sets the optional customer-provided server-side encryption key to use to decrypt this object.- Parameters:
sseKey
- The optional customer-provided server-side encryption key to use to decrypt this object.
-
withSSECustomerKey
public GetObjectRequest withSSECustomerKey(SSECustomerKey sseKey)
Sets the optional customer-provided server-side encryption key to use to decrypt this object, and returns the updated GetObjectRequest so that additional method calls may be chained together.- Parameters:
sseKey
- The optional customer-provided server-side encryption key to use to decrypt this object.- Returns:
- The optional customer-provided server-side encryption key to use to decrypt this object.
-
getPartNumber
public Integer getPartNumber()
Returns the optional part number that indicates the part to be downloaded in a multipart object.
- Returns:
- The part number representing a part in a multipart object.
- See Also:
setPartNumber(Integer)
,withPartNumber(Integer)
-
setPartNumber
public void setPartNumber(Integer partNumber)
Sets the optional part number that indicates the part to be downloaded in a multipart object.
The valid range for part number is 1 - 10000 inclusive. Part numbers are 1 based. If an object has 1 part, partNumber=1 would be the correct not 0. For partNumber < 1, an AmazonS3Exception is thrown with response code 400 bad request. For partNumber larger than actual part count, an AmazonS3Exception is thrown with response code 416 Request Range Not Satisfiable.
- Parameters:
partNumber
- The part number representing a part in a multipart object.- See Also:
getPartNumber()
,withPartNumber(Integer)
-
withPartNumber
public GetObjectRequest withPartNumber(Integer partNumber)
Sets the optional part number that indicates the part to be downloaded in a multipart object.
The valid range for part number is 1 - 10000 inclusive. Part numbers are 1 based. If an object has 1 part, partNumber=1 would be the correct not 0. For partNumber < 1, an AmazonS3Exception is thrown with response code 400 bad request. For partNumber larger than actual part count, an AmazonS3Exception is thrown with response code 416 Request Range Not Satisfiable.
- Parameters:
partNumber
- The part number representing a part in a multipart object.- Returns:
- This
GetObjectRequest
, enabling additional method calls to be chained together. - See Also:
getPartNumber()
,setPartNumber(Integer)
-
getS3ObjectId
public S3ObjectId getS3ObjectId()
Returns an immutable S3 object id.
-
setS3ObjectId
public void setS3ObjectId(S3ObjectId s3ObjectId)
Sets the S3 object id for this request.
-
withS3ObjectId
public GetObjectRequest withS3ObjectId(S3ObjectId s3ObjectId)
Fluent API to set the S3 object id for this request.
-
-