com.aliyun.oss.model

## 类 ListObjectsV2Result

- java.lang.Object
- - com.aliyun.oss.model.GenericResult
  - - com.aliyun.oss.model.ListObjectsV2Result

-     public class ListObjectsV2Result
      extends GenericResult

  This is the result of the listing objects request.

- - ### 构造器概要

    构造器
    构造器和说明
    `ListObjectsV2Result()`

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addCommonPrefix(String commonPrefix)` adds a common prefix element to the common prefixes list
    `void` | `addObjectSummary(OSSObjectSummary objectSummary)` Add the object summary to the list of the object summaries
    `String` | `getBucketName()` Gets the bucket name that containing the objects listing
    `List<String>` | `getCommonPrefixes()` Gets the common prefixes included in this object listing.
    `String` | `getContinuationToken()` Gets the continuation token.
    `String` | `getDelimiter()` Gets the delimiter parameter that you have specified.
    `String` | `getEncodingType()` Gets the encoding type used by OSS to encode object key names in the XML response.
    `int` | `getKeyCount()` Gets the number of keys returned with this response.
    `int` | `getMaxKeys()` Gets the the maximum number of keys to include in the response.
    `String` | `getNextContinuationToken()` Gets the nextContinuationToken.
    `List<OSSObjectSummary>` | `getObjectSummaries()` Gets the list of object summaries describing the objects stored in the bucket.
    `String` | `getPrefix()` The prefix parameter originally specified by the caller when this object listing was returned
    `String` | `getStartAfter()` Returns optional parameter indicating where you want OSS to start the object listing from.
    `boolean` | `isTruncated()` Gets whether or not this object listing is complete.
    `void` | `setBucketName(String bucketName)` Sets the bucket name that containing the objects listing
    `void` | `setContinuationToken(String continuationToken)` Sets the continuation token.
    `void` | `setDelimiter(String delimiter)` Sets the delimiter parameter.
    `void` | `setEncodingType(String encodingType)` Sets the encode type that responded.
    `void` | `setKeyCount(int keyCount)` Sets the number of keys returned with this response.
    `void` | `setMaxKeys(int maxKeys)` Sets the the maximum number of keys to include in the response.
    `void` | `setNextContinuationToken(String nextContinuationToken)` Sets the nextContinuationToken.
    `void` | `setPrefix(String prefix)` Sets the prefix parameter
    `void` | `setStartAfter(String startAfter)` Sets the optional parameter indicating where you want OSS to start the object listing from.
    `void` | `setTruncated(boolean isTruncated)` Sets whether or not this object listing is complete.

    - ### 从类继承的方法 com.aliyun.oss.model.GenericResult

      `getClientCRC, getRequestId, getResponse, getServerCRC, setClientCRC, setRequestId, setResponse, setServerCRC`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### ListObjectsV2Result

          public ListObjectsV2Result()

  - ### 方法详细资料

    - #### getObjectSummaries

          public List<OSSObjectSummary> getObjectSummaries()

      Gets the list of object summaries describing the objects stored in the bucket.

    - #### addObjectSummary

          public void addObjectSummary(OSSObjectSummary objectSummary)

      Add the object summary to the list of the object summaries

    - #### 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. For example, consider a bucket that contains the following objects: "fun/test.jpg", "fun/movie/001.avi", "fun/movie/007.avi". if calling the prefix="fun/" and delimiter="/", the returned `ListObjectsV2Result` object will contain the common prefix of "fun/movie/".
      返回:
        The list of common prefixes included in this object listing, which might be an empty list if no common prefixes were found.

    - #### addCommonPrefix

          public void addCommonPrefix(String commonPrefix)

      adds a common prefix element to the common prefixes list

    - #### getBucketName

          public String getBucketName()

      Gets the bucket name that containing the objects listing

    - #### setBucketName

          public void setBucketName(String bucketName)

      Sets the bucket name that containing the objects listing

    - #### getPrefix

          public String getPrefix()

      The prefix parameter originally specified by the caller when this object listing was returned

    - #### setPrefix

          public void setPrefix(String prefix)

      Sets the prefix parameter
      参数:
        `prefix` - The prefix parameter originally used to request this object listing.

    - #### getMaxKeys

          public int getMaxKeys()

      Gets the the maximum number of keys to include in the response.
      返回:
        The optional parameter indicating the maximum number of keys to include in the response.

    - #### setMaxKeys

          public void setMaxKeys(int maxKeys)

      Sets the 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.

    - #### getDelimiter

          public String getDelimiter()

      Gets the delimiter parameter that you have specified.
      返回:
        The delimiter parameter originally used to request this object listing. Returns null if no delimiter was specified.

    - #### setDelimiter

          public void setDelimiter(String delimiter)

      Sets the delimiter parameter.

    - #### getEncodingType

          public String getEncodingType()

      Gets the encoding type used by OSS to encode object key names in the XML response. If you specify encodingType request parameter, OSS includes this element in the response, and returns encoded key name values in the following response elements: Delimiter, StartAfter, Prefix, NextConfigurationToken, Key.
      返回:
        null if encodingType is not specified in the request parameter.

    - #### setEncodingType

          public void setEncodingType(String encodingType)

      Sets the encode type that responded.
      参数:
        `encodingType` - the encode type that the response contains.

    - #### isTruncated

          public boolean isTruncated()

      Gets whether or not this object listing is complete.
      返回:
        the value true if the listing is truncated and return false if the listing is complete

    - #### setTruncated

          public void setTruncated(boolean isTruncated)

      Sets whether or not this object listing is complete.
      参数:
        `isTruncated` - the value true if the listing is truncated and return false if the listing is complete.

    - #### getKeyCount

          public int getKeyCount()

      Gets the number of keys returned with this response.
      返回:
        number of keys returned with this response.

    - #### setKeyCount

          public void setKeyCount(int keyCount)

      Sets the number of keys returned with this response.
      参数:
        `keyCount` - The number of keys that were returned with this response.

    - #### getContinuationToken

          public String getContinuationToken()

      Gets the continuation token.
      返回:
        The continuation token that you have specified in the request.

    - #### setContinuationToken

          public void setContinuationToken(String continuationToken)

      Sets the continuation token.

    - #### getNextContinuationToken

          public String getNextContinuationToken()

      Gets the nextContinuationToken. NextContinuationToken is sent when isTruncated is true meaning there are more keys in the bucket that can be listed.
      返回:
        The optional nextContinuationToken that can be used for the next request.

    - #### setNextContinuationToken

          public void setNextContinuationToken(String nextContinuationToken)

      Sets the nextContinuationToken. nextContinuationToken is sent when isTruncated is true meaning there are more keys in the bucket that can be listed.
      参数:
        `nextContinuationToken` - The optional NextContinuationToken returned and can be used for the next request.

    - #### getStartAfter

          public String getStartAfter()

      Returns optional parameter indicating where you want OSS to start the object listing from. This can be any key in the bucket.
      返回:
        the optional startAfter parameter

    - #### setStartAfter

          public void setStartAfter(String startAfter)

      Sets the optional parameter indicating where you want OSS to start the object listing from. This can be any key in the bucket.
      参数:
        `startAfter` - The optional startAfter parameter.

Copyright © 2020. All Rights Reserved.