## com.baidubce.services.bos.model
Class ListObjectsResponse

    java.lang.Object
      com.baidubce.model.AbstractBceResponse
          com.baidubce.services.bos.model.BosResponse
              com.baidubce.services.bos.model.ListObjectsResponse

    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.

Field Summary

Fields inherited from class com.baidubce.model.AbstractBceResponse
`metadata`

Constructor Summary
`ListObjectsResponse()`

Method Summary
`String` `getBucketName()` 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.
`String` `getDelimiter()` Gets the delimiter parameter originally used to request this object listing, or `null` if no delimiter specified.
`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 Baidu Bos 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.
`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` `setContents(List<BosObjectSummary> contents)` Sets the list of object summaries describing the objects stored in the Bos bucket.
`void` `setDelimiter(String delimiter)` For internal use only.
`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.

Methods inherited from class com.baidubce.services.bos.model.BosResponse
`getMetadata`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ListObjectsResponse

    public ListObjectsResponse()

Method Detail

### 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.

  Returns:
    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.

  Parameters:
    `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.

  Returns:
    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.

  Parameters:
    `commonPrefixes` - The common prefixes for this object listing.

### getNextMarker

    public String getNextMarker()

  Gets the marker to use in the next `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.

  Returns:
    The marker to use in the next `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.

### 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.

  Parameters:
    `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.

  Returns:
    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.

  Parameters:
    `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, or `null` if no prefix was specified.

  All objects and common prefixes included in this object listing start with the specified prefix.

  Returns:
    The prefix parameter originally used to request this object listing. Returns `null` if 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.

  Parameters:
    `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, or `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.

  Returns:
    The marker parameter originally used to request this object listing. Returns `null` if 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.

  Parameters:
    `marker` - The marker parameter originally used to request this object listing.

### getMaxKeys

    public int getMaxKeys()

  Gets the `maxKeys` parameter originally used to request this object listing, or the default `maxKeys` value provided by Baidu Bos 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.

  Returns:
    The `maxKeys`maxKeys value applied by Baidu Bos if no value was specified.

### setMaxKeys

    public void setMaxKeys(int maxKeys)

  For internal use only. Sets the `maxKeys` parameter originally used to request this object listing, or the default maxKeys applied by Baidu Bos if the requester didn't specify a value.

  Parameters:
    `maxKeys` - The `maxKeys` parameter originally used to request this object listing, or the default `maxKeys` value 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, or `null` if 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.

  Returns:
    The delimiter parameter originally used to request this object listing. Returns `null` if 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.

  Parameters:
    `delimiter` - The delimiter parameter originally used to request this object listing.

### isTruncated

    public boolean isTruncated()

  Gets whether or not this object listing is complete.

  Returns:
    The value `true` if the object listing is not complete. Returns the value `false` if otherwise. When returning `true`, 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.

  Parameters:
    `isTruncated` - The value `true` if the object listing is not complete. The value `false` if otherwise.

Copyright © 2016. All rights reserved.