com.obs.services.model

## 类 UploadPartRequest

- java.lang.Object
- - com.obs.services.model.GenericRequest
  - - com.obs.services.model.UploadPartRequest

-     public class UploadPartRequest
      extends GenericRequest

  Parameters in a part upload request

- - ### 构造器概要

    构造器
    构造器和说明
    `UploadPartRequest()`
    `UploadPartRequest(String bucketName, String objectKey)` Constructor
    `UploadPartRequest(String bucketName, String objectKey, File file)` Constructor
    `UploadPartRequest(String bucketName, String objectKey, Long partSize, InputStream input)` Constructor
    `UploadPartRequest(String bucketName, String objectKey, Long partSize, long offset, File file)` Constructor
    `UploadPartRequest(String bucketName, String objectKey, String fileName)` Constructor

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getBucketName()` Obtain the name of the bucket to which the multipart upload belongs.
    `String` | `getContentMd5()` Set the MD5 value of the data to be uploaded.
    `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.
    `String` | `getObjectKey()` Obtain the name of the object involved in the multipart upload.
    `long` | `getOffset()` Obtain the offset of the part in the file.
    `int` | `getPartNumber()` Obtain the part number.
    `Long` | `getPartSize()` Obtain the part size, in bytes.
    `long` | `getProgressInterval()` Obtain the callback threshold of the data transfer listener.
    `ProgressListener` | `getProgressListener()` Obtain the data transfer listener.
    `SseCHeader` | `getSseCHeader()` Obtain SSE-C encryption headers.
    `String` | `getUploadId()` Obtain the multipart upload ID.
    `boolean` | `isAttachMd5()` Check whether the MD5 value of the data to be uploaded will be automatically calculated.
    `boolean` | `isAutoClose()` Check whether the input stream will be automatically closed.
    `void` | `setAttachMd5(boolean attachMd5)` Specify whether to automatically calculate the MD5 value of the data to be uploaded.
    `void` | `setAutoClose(boolean autoClose)` Specify whether to automatically close the input stream.
    `void` | `setBucketName(String bucketName)` Set the name for the bucket to which the multipart upload belongs.
    `void` | `setContentMd5(String contentMd5)` Obtain the MD5 value of the data to be uploaded.
    `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` | `setObjectKey(String objectKey)` Set the name for the object involved in the multipart upload.
    `void` | `setOffset(long offset)` Set the start position of the to-be-uploaded content in the file.
    `void` | `setPartNumber(int partNumber)` Set the part number.
    `void` | `setPartSize(Long partSize)` Set the part size (in bytes).
    `void` | `setProgressInterval(long progressInterval)` Set the callback threshold of the data transfer listener.
    `void` | `setProgressListener(ProgressListener progressListener)` Set the data transfer listener.
    `void` | `setSseCHeader(SseCHeader sseCHeader)` Set SSE-C encryption headers.
    `void` | `setUploadId(String uploadId)` Set the multipart upload ID.
    `String` | `toString()`

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

      `isRequesterPays, setRequesterPays`

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

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

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

    - #### UploadPartRequest

          public UploadPartRequest()

    - #### UploadPartRequest

          public UploadPartRequest(String bucketName,
                                   String objectKey)

      Constructor
      参数:
        `bucketName` - Name of the bucket to which the multipart upload belongs
        `objectKey` - Name of the object involved in the multipart upload

    - #### UploadPartRequest

          public UploadPartRequest(String bucketName,
                                   String objectKey,
                                   String fileName)

      Constructor
      参数:
        `bucketName` - Name of the bucket to which the multipart upload belongs
        `objectKey` - Name of the object involved in the multipart upload
        `fileName` - File name to be uploaded

    - #### UploadPartRequest

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

      Constructor
      参数:
        `bucketName` - Name of the bucket to which the multipart upload belongs
        `objectKey` - Name of the object involved in the multipart upload
        `file` - File to be uploaded

    - #### UploadPartRequest

          public UploadPartRequest(String bucketName,
                                   String objectKey,
                                   Long partSize,
                                   InputStream input)

      Constructor
      参数:
        `bucketName` - Name of the bucket to which the multipart upload belongs
        `objectKey` - Name of the object involved in the multipart upload
        `partSize` - Part size (in bytes)
        `input` - Data stream to be uploaded

    - #### UploadPartRequest

          public UploadPartRequest(String bucketName,
                                   String objectKey,
                                   Long partSize,
                                   long offset,
                                   File file)

      Constructor
      参数:
        `bucketName` - Name of the bucket to which the multipart upload belongs
        `objectKey` - Name of the object involved in the multipart upload
        `partSize` - Part size (in bytes)
        `offset` - Offset of the part in the file. The default value is 0 (in bytes).
        `file` - File to be uploaded

  - ### 方法详细资料

    - #### getSseCHeader

          public SseCHeader getSseCHeader()

      Obtain SSE-C encryption headers.
      返回:
        SSE-C encryption headers

    - #### setSseCHeader

          public void setSseCHeader(SseCHeader sseCHeader)

      Set SSE-C encryption headers.
      参数:
        `sseCHeader` - SSE-C encryption headers

    - #### getOffset

          public long getOffset()

      Obtain the offset of the part in the file. The default value is 0 (in bytes).
      返回:
        Offset of the part in the 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` - Offset of the part in the file

    - #### getPartNumber

          public int getPartNumber()

      Obtain the part number.
      返回:
        Part number

    - #### setPartNumber

          public void setPartNumber(int partNumber)

      Set the part number.
      参数:
        `partNumber` - Part number

    - #### getUploadId

          public String getUploadId()

      Obtain the multipart upload ID.
      返回:
        Multipart upload ID

    - #### setUploadId

          public void setUploadId(String uploadId)

      Set the multipart upload ID.
      参数:
        `uploadId` - Multipart upload ID

    - #### getBucketName

          public String getBucketName()

      Obtain the name of the bucket to which the multipart upload belongs.
      返回:
        Name of the bucket to which the multipart upload belongs

    - #### setBucketName

          public void setBucketName(String bucketName)

      Set the name for the bucket to which the multipart upload belongs.
      参数:
        `bucketName` - Name of the bucket to which the multipart upload belongs

    - #### getObjectKey

          public String getObjectKey()

      Obtain the name of the object involved in the multipart upload.
      返回:
        Name of the object involved in the multipart upload

    - #### setObjectKey

          public void setObjectKey(String objectKey)

      Set the name for the object involved in the multipart upload.
      参数:
        `objectKey` - Name of the object involved in the multipart upload

    - #### setPartSize

          public void setPartSize(Long partSize)

      Set the part size (in bytes).
      参数:
        `partSize` - Part size

    - #### getPartSize

          public Long getPartSize()

      Obtain the part size, in bytes.
      返回:
        Part size

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

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

    - #### isAttachMd5

          public boolean isAttachMd5()

      Check whether the MD5 value of the data to be uploaded will be automatically calculated. If the MD5 value is set, this parameter can be ignored.
      返回:
        Identifier specifying whether to automatically calculate the MD5 value of the data to be uploaded

    - #### setAttachMd5

          public void setAttachMd5(boolean attachMd5)

      Specify whether to automatically calculate the MD5 value of the data to be uploaded. If the MD5 value is set, this parameter can be ignored.
      参数:
        `attachMd5` - Identifier specifying whether to automatically calculate the MD5 value of the data to be uploaded

    - #### getContentMd5

          public String getContentMd5()

      Set the MD5 value of the data to be uploaded.
      返回:
        MD5 value of the data to be uploaded

    - #### setContentMd5

          public void setContentMd5(String contentMd5)

      Obtain the MD5 value of the data to be uploaded.
      参数:
        `contentMd5` - MD5 value of the data to be uploaded

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