|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.s3.model.GetObjectRequest
public class GetObjectRequest
Options for downloading an S3 object.
All GetObjectRequests must specify a bucket name and key. Beyond that, requests can also specify:
Constructor Summary | |
---|---|
GetObjectRequest(String bucketName,
String key)
Constructs a new GetObjectRequest with all the required parameters. |
|
GetObjectRequest(String bucketName,
String key,
String versionId)
Constructs a new GetObjectRequest with all the required parameters. |
Method Summary | |
---|---|
String |
getBucketName()
Returns the name of the bucket containing the object to be downloaded. |
String |
getKey()
Returns the key under which the object to be downloaded is stored. |
List<String> |
getMatchingETagConstraints()
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. |
Date |
getModifiedSinceConstraint()
Returns the optional modified since constraint that restricts this request to executing only if the object has been modified since the specified date. |
List<String> |
getNonmatchingETagConstraints()
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. |
long[] |
getRange()
Returns the optional byte range (inclusive) within the desired object that will be downloaded by this request. |
Date |
getUnmodifiedSinceConstraint()
Returns the optional unmodified since constraint that restricts this request to executing only if the object has not been modified since the specified date. |
String |
getVersionId()
Returns the optional version ID specifying which version of the object to download. |
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 since constraint that restricts this request to executing only if the object has been modified since 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 |
setRange(long start,
long end)
Sets the optional byte range (inclusive) within the desired object that will be downloaded by this request. |
void |
setUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified since constraint that restricts this request to executing only if the object has not been modified since 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, and returns this object so that additional method calls can be chained together. |
GetObjectRequest |
withKey(String key)
Sets the key under which the object to be downloaded is stored, and returns this object so that additional method calls can be chained together. |
GetObjectRequest |
withMatchingETagConstraint(String eTag)
Adds an single ETag constraint to this request, and returns this object so that additional method calls can be chained together. |
GetObjectRequest |
withModifiedSinceConstraint(Date date)
Sets the optional modified since constraint that restricts this request to executing only if the object has been modified since the specified date. |
GetObjectRequest |
withNonmatchingETagConstraint(String eTag)
Adds a single ETag constraint to this request, and returns this object so that additional method calls can be chained together. |
GetObjectRequest |
withRange(long start,
long end)
Sets the optional byte range (inclusive) within the desired object that will be downloaded by this request, and this returns this request object so that additional method calls can be chained together. |
GetObjectRequest |
withUnmodifiedSinceConstraint(Date date)
Sets the optional unmodified since constraint that restricts this request to executing only if the object has not been modified since the specified date, and returns this object so that additional method calls can be chained together. |
GetObjectRequest |
withVersionId(String versionId)
Sets the optional version ID specifying which version of the object to download, and returns this object so that additional method calls can be chained together. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GetObjectRequest(String bucketName, String key)
bucketName
- The name of the bucket containing the desired object.key
- The key in the specified bucket under which the object is
stored.public GetObjectRequest(String bucketName, String key, String versionId)
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.Method Detail |
---|
public String getBucketName()
public void setBucketName(String bucketName)
bucketName
- The name of the bucket containing the object to be downloaded.public GetObjectRequest withBucketName(String bucketName)
bucketName
- The name of the bucket containing the object to be downloaded.
public String getKey()
public void setKey(String key)
key
- The key under which the object to be downloaded is stored.public GetObjectRequest withKey(String key)
key
- The key under which the object to be downloaded is stored.
public String getVersionId()
Objects created before versioning was enabled or when versioning is
suspended will be given the default/null version ID (see
Constants.NULL_VERSION_ID
). Note that the
Constants.NULL_VERSION_ID
is a valid version ID and is not the
same as not having a version ID.
See
AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
for more information about enabling versioning for a bucket.
public void setVersionId(String versionId)
Objects created before versioning was enabled or when versioning is
suspended will be given the default/null version ID (see
Constants.NULL_VERSION_ID
). Note that the
Constants.NULL_VERSION_ID
is a valid version ID and is not the
same as not having a version ID.
See
AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
for more information about enabling versioning for a bucket.
versionId
- The optional version ID specifying which version of the object
to download.public GetObjectRequest withVersionId(String versionId)
Objects created before versioning was enabled or when versioning is
suspended will be given the default/null version ID (see
Constants.NULL_VERSION_ID
). Note that the
Constants.NULL_VERSION_ID
is a valid version ID and is not the
same as not having a version ID.
See
AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)
for more information about enabling versioning for a bucket.
versionId
- The optional version ID specifying which version of the object
to download.public long[] getRange()
public void setRange(long start, long end)
If no byte range is specified, this request will download the entire object from S3.
start
- The start of the byte range to download (inclusive).end
- The end of the byte range to download (inclusive).public GetObjectRequest withRange(long start, long end)
If no byte range is specified, this request will download the entire object from S3.
start
- The start of the byte range to download (inclusive).end
- The end of the byte range to download (inclusive).
public List<String> getMatchingETagConstraints()
public void setMatchingETagConstraints(List<String> eTagList)
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.public GetObjectRequest withMatchingETagConstraint(String eTag)
eTag
- The matching ETag constraint to add to this request.
public List<String> getNonmatchingETagConstraints()
public void setNonmatchingETagConstraints(List<String> eTagList)
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.public GetObjectRequest withNonmatchingETagConstraint(String eTag)
eTag
- The non-matching ETag constraint to add to this request.
public Date getUnmodifiedSinceConstraint()
public void setUnmodifiedSinceConstraint(Date date)
Note that Amazon S3 will ignore any dates occurring in the future.
date
- The unmodified since constraint that restricts this request to
executing only if the object has not been
modified since this date.public GetObjectRequest withUnmodifiedSinceConstraint(Date date)
Note that Amazon S3 will ignore any dates occurring in the future.
date
- The unmodified since constraint that restricts this request to
executing only if the object has not been
modified since this date.
public Date getModifiedSinceConstraint()
public void setModifiedSinceConstraint(Date date)
Note that Amazon S3 will ignore any dates occurring in the future.
date
- The modified since constraint that restricts this request to
executing only if the object has been modified
since the specified date.public GetObjectRequest withModifiedSinceConstraint(Date date)
Note that Amazon S3 will ignore any dates occurring in the future.
date
- The modified since constraint that restricts this request to
executing only if the object has been modified
since the specified date.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |