public class ListObjectsV2Result extends Object implements Serializable
Constructor and Description |
---|
ListObjectsV2Result() |
Modifier and Type | Method and Description |
---|---|
String |
getBucketName()
The bucket name.
|
List<String> |
getCommonPrefixes()
Gets the common prefixes included in this object listing.
|
String |
getContinuationToken()
Gets the optional continuation token.
|
String |
getDelimiter()
Gets the delimiter parameter originally used to request this object
listing, or
null if no delimiter specified. |
String |
getEncodingType()
Gets the encoding type used by Amazon S3 to encode object key names in
the XML response.
|
int |
getKeyCount()
Gets the number of keys returned with this response.
|
int |
getMaxKeys()
Gets the optional
maxKeys parameter indicating the maximum number of keys to
include in the response. |
String |
getNextContinuationToken()
Gets the optional NextContinuationToken.
|
List<S3ObjectSummary> |
getObjectSummaries()
Gets the list of object summaries describing the objects stored in the
S3 bucket.
|
String |
getPrefix()
Gets the prefix parameter originally used to request this object listing, or
null if no prefix was specified. |
String |
getStartAfter()
Returns optional parameter indicating where you want Amazon S3 to start the object
listing from.
|
boolean |
isTruncated()
Gets whether or not this object listing is complete.
|
void |
setBucketName(String bucketName)
The bucket name.
|
void |
setCommonPrefixes(List<String> commonPrefixes)
For internal use only.
|
void |
setContinuationToken(String continuationToken)
Sets the optional continuation token.
|
void |
setDelimiter(String delimiter)
For internal use only.
|
void |
setEncodingType(String encodingType)
For internal use only.
|
void |
setKeyCount(int keyCount)
Sets the number of keys returned with this response.
|
void |
setMaxKeys(int maxKeys)
Sets the optional
maxKeys parameter indicating the maximum number of keys to
include in the response. |
void |
setNextContinuationToken(String nextContinuationToken)
Sets the optional NextContinuationToken.
|
void |
setPrefix(String prefix)
For internal use only.
|
void |
setStartAfter(String startAfter)
Sets the optional parameter indicating where you want Amazon S3 to start the object
listing from.
|
void |
setTruncated(boolean isTruncated)
For internal use only.
|
public boolean isTruncated()
true
if the object listing is not complete.
Returns the value false
if otherwise.
When returning true
,
additional calls to Amazon S3 may be needed in order to
obtain more results.public void setTruncated(boolean isTruncated)
isTruncated
- The value true
if the object listing is not complete.
The value false
if otherwise.public String getBucketName()
The bucket name.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.
public void setBucketName(String bucketName)
The bucket name.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.
bucketName
- The bucket name.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using S3 on Outposts in the Amazon S3 User Guide.
public String getPrefix()
null
if no prefix was specified.
All objects and common prefixes included
in this object listing start with the specified prefix.null
if no prefix was specified.public void setPrefix(String prefix)
prefix
- The prefix parameter originally used to request this object
listing.public String getDelimiter()
null
if no delimiter specified.
The delimiter value allows callers to condense S3 keys into common prefix listings. For example, if a caller specifies a delimiter of "/" (a common used value for delimiter), any keys that contain a common prefix between the start of the key and the first occurrence of "/" will not be included in the list of object summaries. Instead, the common prefixes list will have one entry for the common prefix.
null
if no delimiter was specified.public void setDelimiter(String delimiter)
delimiter
- The delimiter parameter originally used to request this object
listing.public String getEncodingType()
encodingType
request
parameter, Amazon S3 includes this element in the response, and returns
encoded key name values in the following response elements:
Delimiter, Marker, Prefix,
NextMarker, Key
.Null
if encodingType
is not specified
in the request parameter.public void setEncodingType(String encodingType)
encodingType
- Null
if encodingType
is not
specified in the request parameter.public String getContinuationToken()
public void setContinuationToken(String continuationToken)
continuationToken
- The optional continuation token to associate with this request.public String getNextContinuationToken()
public void setNextContinuationToken(String nextContinuationToken)
nextContinuationToken
- The optional NextContinuationToken parameter to associate with this request.public int getKeyCount()
public void setKeyCount(int keyCount)
keyCount
- The number of keys that were returned with this response.public int getMaxKeys()
maxKeys
parameter indicating the maximum number of keys to
include in the response. Amazon S3 might return fewer keys than specified, but will
never return more. Even if the optional parameter is not specified,
Amazon S3 will limit the number of results in the response.public void setMaxKeys(int maxKeys)
maxKeys
parameter indicating the maximum number of keys to
include in the response.maxKeys
- The optional parameter indicating the maximum number of keys
to include in the response.public String getStartAfter()
public void setStartAfter(String startAfter)
startAfter
- The optional startAfter parameter. This can be any key in the bucket.public List<S3ObjectSummary> getObjectSummaries()
isTruncated()
method to see if the returned
listing is complete or if additional calls are needed to get
more results. Callers can pass the nextContinuationToken into subsequent
requests to get additional results.public List<String> getCommonPrefixes()
Gets the common prefixes included in this object listing. Common prefixes are only present if a delimiter was specified in the original request.
Each common prefix represents a set of keys in the S3 bucket that have been condensed and omitted from the object summary results. This allows applications to organize and browse their keys hierarchically, similar to how a file system organizes files into directories.
For example, consider a bucket that contains the following keys:
listObjects
with the prefix="foo/" and the delimiter="/" on
this bucket, the returned S3ObjectListing
will contain one entry in the common
prefixes list ("foo/bar/") and none of the keys beginning with that
common prefix will be included in the object summaries list.public void setCommonPrefixes(List<String> commonPrefixes)
commonPrefixes
- The common prefixes for this object listing.Copyright © 2021. All rights reserved.