com.obs.services.model

## 类 PutObjectRequest

- java.lang.Object
- - com.obs.services.model.GenericRequest
  - - com.obs.services.model.PutObjectBasicRequest
    - - com.obs.services.model.PutObjectRequest

- 直接已知子类:
    AppendObjectRequest, NewFileRequest

      public class PutObjectRequest
      extends PutObjectBasicRequest

  Parameters in an object upload request

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected int` | `expires`
    `protected File` | `file`
    `protected InputStream` | `input`
    `protected ObjectMetadata` | `metadata`
    `protected long` | `offset`

    - ### 从类继承的字段 com.obs.services.model.PutObjectBasicRequest

      `acl, bucketName, extensionPermissionMap, objectKey, sseCHeader, sseKmsHeader, successRedirectLocation`

  - ### 构造器概要

    构造器
    构造器和说明
    `PutObjectRequest()`
    `PutObjectRequest(PutObjectBasicRequest request)`
    `PutObjectRequest(String bucketName, String objectKey)` Constructor
    `PutObjectRequest(String bucketName, String objectKey, File file)` Constructor
    `PutObjectRequest(String bucketName, String objectKey, InputStream input)` Constructor

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `getExpires()` Obtain the expiration time of the object.
    `File` | `getFile()` Obtain the file to be uploaded, which cannot be used with the data stream.
    `InputStream` | `getInput()` Obtain the data stream to be uploaded, which cannot be used with the file to be uploaded.
    `ObjectMetadata` | `getMetadata()` Obtain object properties, including "content-type", "content-length", "content-md5", and customized metadata.
    `long` | `getOffset()` Obtain the start position of the to-be-uploaded content in the file.
    `long` | `getProgressInterval()` Obtain the callback threshold of the data transfer listener.
    `ProgressListener` | `getProgressListener()` Obtain the data transfer listener.
    `boolean` | `isAutoClose()` Check whether the input stream will be automatically closed.
    `void` | `setAutoClose(boolean autoClose)` Specify whether to automatically close the input stream.
    `void` | `setExpires(int expires)` Set the expiration time of the object.
    `void` | `setFile(File file)` Set the file to be uploaded, which cannot be used with the data stream.
    `void` | `setInput(InputStream input)` Set the data stream to be uploaded, which cannot be used with the file to be uploaded.
    `void` | `setMetadata(ObjectMetadata metadata)` Set the object properties, including "content-type", "content-length", and customized metadata.
    `void` | `setOffset(long offset)` Set the start position of the to-be-uploaded content in the file.
    `void` | `setProgressInterval(long progressInterval)` Set the callback threshold of the data transfer listener.
    `void` | `setProgressListener(ProgressListener progressListener)` Set the data transfer listener.
    `String` | `toString()`

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

      `getAcl, getAllGrantPermissions, getBucketName, getDomainIdsByGrantPermission, getExtensionPermissionMap, getGrantPermissionsByDomainId, getObjectKey, getSseCHeader, getSseKmsHeader, getSuccessRedirectLocation, grantExtensionPermission, setAcl, setBucketName, setExtensionPermissionMap, setObjectKey, setSseCHeader, setSseKmsHeader, setSuccessRedirectLocation, withdrawExtensionPermission, withdrawExtensionPermissions`

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

      `isRequesterPays, setRequesterPays`

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

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

- - ### 字段详细资料

    - #### file

          protected File file

    - #### input

          protected InputStream input

    - #### metadata

          protected ObjectMetadata metadata

    - #### expires

          protected int expires

    - #### offset

          protected long offset

  - ### 构造器详细资料

    - #### PutObjectRequest

          public PutObjectRequest()

    - #### PutObjectRequest

          public PutObjectRequest(PutObjectBasicRequest request)

    - #### PutObjectRequest

          public PutObjectRequest(String bucketName,
                                  String objectKey)

      Constructor
      参数:
        `bucketName` - Bucket name
        `objectKey` - Object name

    - #### PutObjectRequest

          public PutObjectRequest(String bucketName,
                                  String objectKey,
                                  File file)

      Constructor
      参数:
        `bucketName` - Bucket name
        `objectKey` - Object name
        `file` - File to be uploaded

    - #### PutObjectRequest

          public PutObjectRequest(String bucketName,
                                  String objectKey,
                                  InputStream input)

      Constructor
      参数:
        `bucketName` - Bucket name
        `objectKey` - Object name
        `input` - Data stream to be uploaded

  - ### 方法详细资料

    - #### getOffset

          public long getOffset()

      Obtain the start position of the to-be-uploaded content in the file. This parameter is effective only when the path where the file is to be uploaded is configured.
      返回:
        Start position of the content to be uploaded in the local file

    - #### setOffset

          public void setOffset(long offset)

      Set the start position of the to-be-uploaded content in the file. This parameter is effective only when the path where the file is to be uploaded is configured. The unit is byte and the default value is 0.
      参数:
        `offset` - Start position of the content to be uploaded in the local file

    - #### getInput

          public InputStream getInput()

      Obtain the data stream to be uploaded, which cannot be used with the file to be uploaded.
      返回:
        Data stream to be uploaded

    - #### setInput

          public void setInput(InputStream input)

      Set the data stream to be uploaded, which cannot be used with the file to be uploaded.
      参数:
        `input` - Data stream to be uploaded

    - #### getMetadata

          public ObjectMetadata getMetadata()

      Obtain object properties, including "content-type", "content-length", "content-md5", and customized metadata.
      返回:
        Object properties

    - #### setMetadata

          public void setMetadata(ObjectMetadata metadata)

      Set the object properties, including "content-type", "content-length", and customized metadata.
      参数:
        `metadata` - Object properties

    - #### getFile

          public File getFile()

      Obtain the file to be uploaded, which cannot be used with the data stream.
      返回:
        File to be uploaded

    - #### setFile

          public void setFile(File file)

      Set the file to be uploaded, which cannot be used with the data stream.
      参数:
        `file` - File to be uploaded

    - #### getExpires

          public int getExpires()

      Obtain the expiration time of the object.
      返回:
        Expiration time of the object

    - #### setExpires

          public void setExpires(int expires)

      Set the expiration time of the object. The value must be a positive integer.
      参数:
        `expires` - Expiration time of the object

    - #### isAutoClose

          public boolean isAutoClose()

      Check whether the input stream will be automatically closed. The default value is "true".
      返回:
        Identifier specifying whether the input stream will be automatically closed

    - #### setAutoClose

          public void setAutoClose(boolean autoClose)

      Specify whether to automatically close the input stream. The default value is "true".
      参数:
        `autoClose` - Identifier specifying whether the input stream will be automatically closed

    - #### getProgressListener

          public ProgressListener getProgressListener()

      Obtain the data transfer listener.
      返回:
        Data transfer listener

    - #### setProgressListener

          public void setProgressListener(ProgressListener progressListener)

      Set the data transfer listener.
      参数:
        `progressListener` - Data transfer listener

    - #### getProgressInterval

          public long getProgressInterval()

      Obtain the callback threshold of the data transfer listener. The default value is 100 KB.
      返回:
        Callback threshold of the data transfer listener

    - #### setProgressInterval

          public void setProgressInterval(long progressInterval)

      Set the callback threshold of the data transfer listener. The default value is 100 KB.
      参数:
        `progressInterval` - Callback threshold of the data transfer listener

    - #### toString

          public String toString()

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

Copyright © 2021. All rights reserved.