## 类的使用
com.obs.services.model.ObjectMetadata

- 使用ObjectMetadata的程序包
  程序包 | 说明
  --- | ---
  com.obs.services |
  com.obs.services.model |
  com.obs.services.model.fs |

- - ### com.obs.services中ObjectMetadata的使用

    返回ObjectMetadata的com.obs.services中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `ObjectMetadata` | ObsClient.`getObjectMetadata(GetObjectMetadataRequest request)`
    `ObjectMetadata` | IObsClient.`getObjectMetadata(GetObjectMetadataRequest request)` Obtain object properties.
    `ObjectMetadata` | SecretFlexibleObsClient.`getObjectMetadata(GetObjectMetadataRequest request, String accessKey, String secretKey)`
    `ObjectMetadata` | SecretFlexibleObsClient.`getObjectMetadata(GetObjectMetadataRequest request, String accessKey, String secretKey, String securityToken)`
    `ObjectMetadata` | ObsClient.`getObjectMetadata(String bucketName, String objectKey)`
    `ObjectMetadata` | IObsClient.`getObjectMetadata(String bucketName, String objectKey)` Obtain object properties.
    `ObjectMetadata` | ObsClient.`getObjectMetadata(String bucketName, String objectKey, String versionId)`
    `ObjectMetadata` | IObsClient.`getObjectMetadata(String bucketName, String objectKey, String versionId)` Obtain object properties.
    `ObjectMetadata` | ObsClient.`setObjectMetadata(SetObjectMetadataRequest request)`
    `ObjectMetadata` | IObsClient.`setObjectMetadata(SetObjectMetadataRequest request)` Set object properties.

    参数类型为ObjectMetadata的com.obs.services中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `PutObjectResult` | ObsClient.`putObject(String bucketName, String objectKey, File file, ObjectMetadata metadata)`
    `PutObjectResult` | IObsClient.`putObject(String bucketName, String objectKey, File file, ObjectMetadata metadata)` Upload an object.
    `PutObjectResult` | ObsClient.`putObject(String bucketName, String objectKey, InputStream input, ObjectMetadata metadata)`
    `PutObjectResult` | IObsClient.`putObject(String bucketName, String objectKey, InputStream input, ObjectMetadata metadata)` Upload an object.

  - ### com.obs.services.model中ObjectMetadata的使用

    声明为ObjectMetadata的com.obs.services.model中的字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected ObjectMetadata` | S3Object.`metadata` 已过时。
    `protected ObjectMetadata` | PutObjectRequest.`metadata`

    返回ObjectMetadata的com.obs.services.model中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `ObjectMetadata` | InitiateMultipartUploadRequest.`getMetadata()` Set object properties, including customized metadata.
    `ObjectMetadata` | ObsObject.`getMetadata()` Obtain the object properties, including "content-type", "content-length", and customized metadata.
    `ObjectMetadata` | S3Object.`getMetadata()` 已过时。
    `ObjectMetadata` | PutObjectRequest.`getMetadata()` Obtain object properties, including "content-type", "content-length", "content-md5", and customized metadata.
    `ObjectMetadata` | CopyObjectRequest.`getNewObjectMetadata()` Obtain the properties, including customized metadata, of the destination object.
    `ObjectMetadata` | UploadFileRequest.`getObjectMetadata()` Obtain object properties.
    `ObjectMetadata` | DownloadFileResult.`getObjectMetadata()` Obtain object properties.

    参数类型为ObjectMetadata的com.obs.services.model中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | InitiateMultipartUploadRequest.`setMetadata(ObjectMetadata metadata)` Obtain object properties, including customized metadata.
    `void` | ObsObject.`setMetadata(ObjectMetadata metadata)` Set the object properties, including "content-type", "content-length", and customized metadata.
    `void` | S3Object.`setMetadata(ObjectMetadata metadata)` 已过时。
    `void` | PutObjectRequest.`setMetadata(ObjectMetadata metadata)` Set the object properties, including "content-type", "content-length", and customized metadata.
    `void` | CopyObjectRequest.`setNewObjectMetadata(ObjectMetadata newObjectMetadata)` Set the properties, including customized metadata, of the destination object.
    `void` | UploadFileRequest.`setObjectMetadata(ObjectMetadata objectMetadata)` Set object properties.
    `void` | DownloadFileResult.`setObjectMetadata(ObjectMetadata objectMetadata)` Set object properties.

  - ### com.obs.services.model.fs中ObjectMetadata的使用

    com.obs.services.model.fs中ObjectMetadata的子类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `ObsFSAttribute` File or folder properties

    参数类型为ObjectMetadata的com.obs.services.model.fs中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `ObsFSFile` | ObsFSBucket.`newFile(String fileName, File file, ObjectMetadata metadata)` Create a file.
    `ObsFSFile` | ObsFSBucket.`newFile(String fileName, InputStream input, ObjectMetadata metadata)` Create a file.

Copyright © 2021. All rights reserved.