com.obs.services.model

## 类 ObjectMetadata

- java.lang.Object
- - com.obs.services.internal.InternalHeaderResponse
  - - com.obs.services.model.HeaderResponse
    - - com.obs.services.model.ObjectMetadata

- 直接已知子类:
    ObsFSAttribute

      public class ObjectMetadata
      extends HeaderResponse

  Object properties

- - ### 字段概要

    - ### 从类继承的字段 com.obs.services.internal.InternalHeaderResponse

      `responseHeaders, statusCode`

  - ### 构造器概要

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

  - ### 方法概要

    所有方法 实例方法 具体方法 已过时的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addUserMetadata(String key, String value)` Add customized metadata for an object.
    `String` | `getContentEncoding()` Obtain the content encoding of the object.
    `Long` | `getContentLength()` Obtain the content length of an object.
    `String` | `getContentMd5()` Obtain Base64-encoded MD5 value of an object.
    `String` | `getContentType()` Obtain the MIME type of an object.
    `String` | `getEtag()` Obtain the ETag of the object.
    `Date` | `getLastModified()` Obtain the last modification time of the object.
    `Map<String,Object>` | `getMetadata()` Obtain object properties.
    `long` | `getNextPosition()` Obtain the start position for next appending.
    `StorageClassEnum` | `getObjectStorageClass()` Obtain the object storage class.
    `String` | `getStorageClass()` 已过时。
    `Object` | `getUserMetadata(String key)` Obtain the customized metadata of an object.
    `Object` | `getValue(String name)`
    `String` | `getWebSiteRedirectLocation()` Set the redirection link which can redirect the request to another object in the bucket or to an external URL.
    `boolean` | `isAppendable()` Identify whether an object is appendable.
    `void` | `setAppendable(boolean appendable)`
    `void` | `setContentEncoding(String contentEncoding)` Set the content encoding of the object.
    `void` | `setContentLength(Long contentLength)` Set the content length of an object.
    `void` | `setContentMd5(String contentMd5)` Set the Base64-encoded MD5 value for an object.
    `void` | `setContentType(String contentType)` Set the MIME type for an object.
    `void` | `setEtag(String objEtag)`
    `void` | `setLastModified(Date lastModified)`
    `void` | `setMetadata(Map<String,Object> metadata)` Set object properties.
    `void` | `setNextPosition(long nextPosition)`
    `void` | `setObjectStorageClass(StorageClassEnum storageClass)` Set the object storage class.
    `void` | `setStorageClass(String storageClass)` 已过时。
    `void` | `setWebSiteRedirectLocation(String webSiteRedirectLocation)` Obtain the redirection link which can redirect the request to another object in the bucket or to an external URL.
    `String` | `toString()`

    - ### 从类继承的方法 com.obs.services.model.HeaderResponse

      `getRequestId, getResponseHeaders, getStatusCode`

    - ### 从类继承的方法 com.obs.services.internal.InternalHeaderResponse

      `setResponseHeaders, setStatusCode`

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

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

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

    - #### ObjectMetadata

          public ObjectMetadata()

  - ### 方法详细资料

    - #### isAppendable

          public boolean isAppendable()

      Identify whether an object is appendable.
      返回:
        Identifier specifying whether the object is appendable

    - #### setAppendable

          public void setAppendable(boolean appendable)

    - #### getNextPosition

          public long getNextPosition()

      Obtain the start position for next appending. This setting is valid only when "isAppendable" is set to "true" and this parameter value is larger than "0".
      返回:
        Position from which the next appending starts

    - #### setNextPosition

          public void setNextPosition(long nextPosition)

    - #### getMetadata

          public Map<String,Object> getMetadata()

      Obtain object properties.
      返回:
        Object properties

    - #### addUserMetadata

          public void addUserMetadata(String key,
                                      String value)

      Add customized metadata for an object.
      参数:
        `key` - Keyword of the customized metadata
        `value` - Value of the customized metadata

    - #### getUserMetadata

          public Object getUserMetadata(String key)

      Obtain the customized metadata of an object.
      参数:
        `key` - Keyword of the customized metadata
      返回:
        Value of the customized metadata

    - #### getEtag

          public String getEtag()

      Obtain the ETag of the object.
      返回:
        ETag of the object

    - #### setEtag

          public void setEtag(String objEtag)

    - #### setMetadata

          public void setMetadata(Map<String,Object> metadata)

      Set object properties.
      参数:
        `metadata` - Object properties

    - #### getLastModified

          public Date getLastModified()

      Obtain the last modification time of the object.
      返回:
        Last modification time of the object

    - #### setLastModified

          public void setLastModified(Date lastModified)

    - #### getContentEncoding

          public String getContentEncoding()

      Obtain the content encoding of the object.
      返回:
        Content encoding

    - #### setContentEncoding

          public void setContentEncoding(String contentEncoding)

      Set the content encoding of the object.
      参数:
        `contentEncoding` - Content encoding

    - #### getContentLength

          public Long getContentLength()

      Obtain the content length of an object.
      返回:
        Content length of the object

    - #### setContentLength

          public void setContentLength(Long contentLength)

      Set the content length of an object.
      参数:
        `contentLength` - Content length of the object

    - #### getContentType

          public String getContentType()

      Obtain the MIME type of an object.
      返回:
        MIME type of the object

    - #### setContentType

          public void setContentType(String contentType)

      Set the MIME type for an object.
      参数:
        `contentType` - MIME type of the object

    - #### getStorageClass

          @Deprecated
          public String getStorageClass()

      已过时。
      Obtain the object storage class.
      返回:
        Object storage class

    - #### setStorageClass

          @Deprecated
          public void setStorageClass(String storageClass)

      已过时。
      Set the object storage class.
      参数:
        `storageClass` - Object storage class

    - #### getObjectStorageClass

          public StorageClassEnum getObjectStorageClass()

      Obtain the object storage class.
      返回:
        Object storage class

    - #### setObjectStorageClass

          public void setObjectStorageClass(StorageClassEnum storageClass)

      Set the object storage class.
      参数:
        `storageClass` - Object storage class

    - #### getValue

          public Object getValue(String name)

    - #### getContentMd5

          public String getContentMd5()

      Obtain Base64-encoded MD5 value of an object.
      返回:
        Base64-encoded MD5 value of the object

    - #### setContentMd5

          public void setContentMd5(String contentMd5)

      Set the Base64-encoded MD5 value for an object.
      参数:
        `contentMd5` - Base64-encoded MD5 value of the object

    - #### getWebSiteRedirectLocation

          public String getWebSiteRedirectLocation()

      Set the redirection link which can redirect the request to another object in the bucket or to an external URL.
      返回:
        Redirection link

    - #### setWebSiteRedirectLocation

          public void setWebSiteRedirectLocation(String webSiteRedirectLocation)

      Obtain the redirection link which can redirect the request to another object in the bucket or to an external URL.
      参数:
        `webSiteRedirectLocation` - Redirection link

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `HeaderResponse`

Copyright © 2021. All rights reserved.