类 ListObjectsResponse
- java.lang.Object
-
- com.baidubce.model.AbstractBceResponse
-
- com.baidubce.services.bos.model.BosResponse
-
- com.baidubce.services.bos.model.ListObjectsResponse
-
- 所有已实现的接口:
Serializable
public class ListObjectsResponse extends BosResponse
Contains the results of listing the objects in an Baidu Bos bucket. This includes a list of 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.- 另请参阅:
- 序列化表格
-
-
字段概要
-
从类继承的字段 com.baidubce.model.AbstractBceResponse
metadata
-
-
构造器概要
构造器 构造器 说明 ListObjectsResponse()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringgetBucketName()Gets the name of the Baidu Bos bucket containing the objects.List<String>getCommonPrefixes()Gets the common prefixes included in this object listing.List<BosObjectSummary>getContents()Gets the list of object summaries describing the objects stored in the Bos bucket.StringgetDelimiter()Gets the delimiter parameter originally used to request this object listing, ornullif no delimiter specified.StringgetMarker()Gets the marker parameter originally used to request this object listing, ornullif no marker was specified.intgetMaxKeys()Gets themaxKeysparameter originally used to request this object listing, or the defaultmaxKeysvalue provided by Baidu Bos if the requester didn't specify a value.StringgetNextMarker()Gets the marker to use in the nextlistObjectsrequest in order to see the next page of results.StringgetPrefix()Gets the prefix parameter originally used to request this object listing, ornullif no prefix was specified.booleanisTruncated()Gets whether or not this object listing is complete.voidsetBucketName(String bucketName)For internal use only.voidsetCommonPrefixes(List<String> commonPrefixes)For internal use only.voidsetContents(List<BosObjectSummary> contents)Sets the list of object summaries describing the objects stored in the Bos bucket.voidsetDelimiter(String delimiter)For internal use only.voidsetMarker(String marker)For internal use only.voidsetMaxKeys(int maxKeys)For internal use only.voidsetNextMarker(String nextMarker)For internal use only.voidsetPrefix(String prefix)For internal use only.voidsetTruncated(boolean isTruncated)For internal use only.-
从类继承的方法 com.baidubce.services.bos.model.BosResponse
getMetadata
-
-
-
-
方法详细资料
-
getContents
public List<BosObjectSummary> getContents()
Gets the list of object summaries describing the objects stored in the Bos bucket. Listings for large buckets can be truncated for performance reasons.- 返回:
- A list of the object summaries describing the objects stored in the Bos bucket.
-
setContents
public void setContents(List<BosObjectSummary> contents)
Sets the list of object summaries describing the objects stored in the Bos bucket. Listings for large buckets can be truncated for performance reasons.- 参数:
contents- A list of the object summaries describing the objects stored in the Bos bucket.
-
getCommonPrefixes
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 Bos 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.
- 返回:
- The list of common prefixes included in this object listing, which might be an empty list if no common prefixes were found.
-
setCommonPrefixes
public void setCommonPrefixes(List<String> commonPrefixes)
For internal use only. Sets the common prefixes for this object listing, representing the key prefixes that were rolled up because of the request's delimiter parameter.- 参数:
commonPrefixes- The common prefixes for this object listing.
-
getNextMarker
public String getNextMarker()
Gets the marker to use in the nextlistObjectsrequest 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.- 返回:
- The marker to use in the next
listObjectsrequest in order to see the next page of results if this object listing is truncated. Returnsnullif this object listing isn't truncated.
-
setNextMarker
public void setNextMarker(String nextMarker)
For internal use only. Sets the marker to use in the next list objects request in order to see the next page of results for a truncated object listing.- 参数:
nextMarker- The marker to use in the next listObjects request in order to see the next page of results for a truncated object listing.
-
getBucketName
public String getBucketName()
Gets the name of the Baidu Bos bucket containing the objects.- 返回:
- The name of the Baidu Bos bucket containing the objects.
-
setBucketName
public void setBucketName(String bucketName)
For internal use only. Sets the name of the Baidu Bos bucket containing the objects listed in this BosObjectListing.- 参数:
bucketName- The name of the Baidu Bos bucket containing the objects listed in this BosObjectListing.
-
getPrefix
public String getPrefix()
Gets the prefix parameter originally used to request this object listing, ornullif no prefix was specified.All objects and common prefixes included in this object listing start with the specified prefix.
- 返回:
- The prefix parameter originally used to request this object
listing. Returns
nullif no prefix was specified.
-
setPrefix
public void setPrefix(String prefix)
For internal use only. Sets the prefix parameter originally used to request this object listing.- 参数:
prefix- The prefix parameter originally used to request this object listing.
-
getMarker
public String getMarker()
Gets the marker parameter originally used to request this object listing, ornullif no marker was specified. If specified, all objects and common prefixes included in this object listing will occur alphabetically after the specified marker.- 返回:
- The marker parameter originally used to request this object
listing. Returns
nullif no marker was specified.
-
setMarker
public void setMarker(String marker)
For internal use only. Sets the marker parameter originally used to request this object listing.- 参数:
marker- The marker parameter originally used to request this object listing.
-
getMaxKeys
public int getMaxKeys()
Gets themaxKeysparameter originally used to request this object listing, or the defaultmaxKeysvalue provided by Baidu Bos if the requester didn't specify a value. ThemaxKeysparameter 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 themaxKeys, but can of course contain less.- 返回:
- The
maxKeysparameter originally used to request this object listing. Returns the defaultmaxKeysvalue applied by Baidu Bos if no value was specified.
-
setMaxKeys
public void setMaxKeys(int maxKeys)
For internal use only. Sets themaxKeysparameter originally used to request this object listing, or the default maxKeys applied by Baidu Bos if the requester didn't specify a value.- 参数:
maxKeys- ThemaxKeysparameter originally used to request this object listing, or the defaultmaxKeysvalue applied by Baidu Bos if the requester didn't specify a value.
-
getDelimiter
public String getDelimiter()
Gets the delimiter parameter originally used to request this object listing, ornullif no delimiter specified.The delimiter value allows callers to condense Bos 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.
- 返回:
- The delimiter parameter originally used to request this object
listing. Returns
nullif no delimiter was specified.
-
setDelimiter
public void setDelimiter(String delimiter)
For internal use only. Sets the delimiter parameter originally used to request this object listing.- 参数:
delimiter- The delimiter parameter originally used to request this object listing.
-
isTruncated
public boolean isTruncated()
Gets whether or not this object listing is complete.- 返回:
- The value
trueif the object listing is not complete. Returns the valuefalseif otherwise. When returningtrue, additional calls to Baidu Bos may be needed in order to obtain more results.
-
setTruncated
public void setTruncated(boolean isTruncated)
For internal use only. Sets the truncated property for this object listing, indicating if this is a complete listing or not and whether the caller needs to make additional calls to Bos to get more object summaries.- 参数:
isTruncated- The valuetrueif the object listing is not complete. The valuefalseif otherwise.
-
-