public class ObjectListing extends Object implements Serializable
S3ObjectSummary
objects describing the objects stored in
the bucket, a list of common prefixes if a delimiter was specified in the
request, information describing if this is a complete or partial
listing, and the original request parameters.Constructor and Description |
---|
ObjectListing() |
Modifier and Type | Method and Description |
---|---|
String |
getBucketName()
Gets the name of the Amazon S3 bucket containing the objects listed in
this
ObjectListing . |
List<String> |
getCommonPrefixes()
Gets the common prefixes included in this object listing.
|
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.
|
String |
getIBMSSEKPCrk()
Returns the CRK header of the GET Bucket request
|
boolean |
getIBMSSEKPEnabled()
Returns if KP has been enabled
|
String |
getMarker()
Gets the marker parameter originally used to request this object listing, or
null if no marker was specified. |
int |
getMaxKeys()
Gets the
maxKeys parameter originally used to request this object
listing, or the default maxKeys value provided by Amazon S3 if the
requester didn't specify a value. |
String |
getNextMarker()
Gets the marker to use in the next
listObjects
request in order to see
the next page of results. |
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. |
boolean |
isTruncated()
Gets whether or not this object listing is complete.
|
void |
setBucketName(String bucketName)
For internal use only.
|
void |
setCommonPrefixes(List<String> commonPrefixes)
For internal use only.
|
void |
setDelimiter(String delimiter)
For internal use only.
|
void |
setEncodingType(String encodingType)
For internal use only.
|
void |
setIBMSSEKPCrk(String iBMSSEKPCrk)
Sets the CRK value
|
void |
setIBMSSEKPEnabled(boolean iBMSSEKPEnabled)
Sets if KP is enabled
|
void |
setMarker(String marker)
For internal use only.
|
void |
setMaxKeys(int maxKeys)
For internal use only.
|
void |
setNextMarker(String nextMarker)
For internal use only.
|
void |
setPrefix(String prefix)
For internal use only.
|
void |
setTruncated(boolean isTruncated)
For internal use only.
|
public boolean getIBMSSEKPEnabled()
public void setIBMSSEKPEnabled(boolean iBMSSEKPEnabled)
iBMSSEKPEnabled
- public String getIBMSSEKPCrk()
public void setIBMSSEKPCrk(String iBMSSEKPCrk)
iBMSSEKPCrkName
- public List<S3ObjectSummary> getObjectSummaries()
ObjectListing.isTruncated()
method to see if the returned
listing is complete or if additional calls are needed to get
more results. Callers might need to make
additional calls to
AmazonS3.listNextBatchOfObjects(ObjectListing)
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.public String getNextMarker()
listObjects
request in order to see
the next page of results.
If an object listing is not truncated, this
method will return null
. For
truncated requests, this value is equal to the greatest
lexicographical value of the object keys and common prefixes included
in this listing.listObjects
request in order to see
the next page of results if this object listing is truncated.
Returns null
if this object listing isn't truncated.public void setNextMarker(String nextMarker)
nextMarker
- The marker to use in the next listObjects request in order to
see the next page of results for a truncated object listing.public String getBucketName()
ObjectListing
.ObjectListing
.public void setBucketName(String bucketName)
bucketName
- The name of the Amazon S3 bucket containing the objects listed
in this S3ObjectListing.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 getMarker()
null
if no marker was specified.
If specified, all objects and common
prefixes included in this object listing will occur
alphabetically after the specified marker.null
if no marker was specified.public void setMarker(String marker)
marker
- The marker parameter originally used to request this object
listing.public int getMaxKeys()
maxKeys
parameter originally used to request this object
listing, or the default maxKeys
value provided by Amazon S3 if the
requester didn't specify a value. The maxKeys
parameter limits the
combined number of objects and common prefixes included in this object
listing. An object listing will never contain more objects plus common
prefixes than indicated by the maxKeys
, but can of course contain less.maxKeys
parameter originally used to request this object
listing. Returns the default maxKeys
value applied by Amazon S3 if
no value was specified.public void setMaxKeys(int maxKeys)
maxKeys
parameter
originally used to request this object listing, or the default maxKeys
applied by Amazon S3 if the requester didn't specify a value.maxKeys
- The maxKeys
parameter originally used to request this object
listing, or the default maxKeys
value applied by Amazon S3 if
the requester didn't specify a value.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 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 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.Copyright © 2024. All rights reserved.