com.aliyun.oss.model

## 类 UploadPartRequest

- java.lang.Object
- - com.aliyun.oss.model.WebServiceRequest
  - - com.aliyun.oss.model.GenericRequest
    - - com.aliyun.oss.model.UploadPartRequest

-     public class UploadPartRequest
      extends GenericRequest

  This is the request class to upload a file part in a multipart upload.

- - ### 字段概要

    - ### 从类继承的字段 com.aliyun.oss.model.WebServiceRequest

      `NOOP`

  - ### 构造器概要

    构造器
    构造器和说明
    `UploadPartRequest()`
    `UploadPartRequest(String bucketName, String key)`
    `UploadPartRequest(String bucketName, String key, String uploadId, int partNumber, InputStream inputStream, long partSize)`

  - ### 方法概要

    方法
    限定符和类型 | 方法和说明
    --- | ---
    `BoundedInputStream` | `buildPartialStream()`
    `InputStream` | `getInputStream()` Gets the data stream for the part.
    `String` | `getMd5Digest()` Gets the part's MD5 value.
    `int` | `getPartNumber()` Gets the part number.
    `long` | `getPartSize()` Gets the part size.
    `int` | `getTrafficLimit()` Gets traffic limit speed, its unit is bit/s
    `String` | `getUploadId()` Gets the multipart upload Id.
    `boolean` | `isUseChunkEncoding()` Gets the flag of using chunked transfer encoding.
    `void` | `setInputStream(InputStream inputStream)` Sets the data stream for the part.
    `void` | `setMd5Digest(String md5Digest)` Sets the part's MD5 value.
    `void` | `setPartNumber(int partNumber)` Sets the part number.
    `void` | `setPartSize(long partSize)` Sets the part size.
    `void` | `setTrafficLimit(int trafficLimit)` Sets traffic limit speed, its unit is bit/s
    `void` | `setUploadId(String uploadId)` Sets the multipart upload Id.
    `void` | `setUseChunkEncoding(boolean useChunkEncoding)` Sets the flag of using chunked transfer encoding.

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

      `getBucketName, getKey, getRequestPayer, getVersionId, setBucketName, setKey, setRequestPayer, setVersionId, withBucketName, withKey, withRequestPayer, withVersionId`

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

      `addAdditionalHeaderName, addHeader, addParameter, getAdditionalHeaderNames, getHeaders, getParameters, getProgressListener, isLogEnabled, setAdditionalHeaderNames, setHeaders, setLogEnabled, setParameters, setProgressListener, withProgressListener`

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

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

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

    - #### UploadPartRequest

          public UploadPartRequest()

    - #### UploadPartRequest

          public UploadPartRequest(String bucketName,
                           String key)

    - #### UploadPartRequest

          public UploadPartRequest(String bucketName,
                           String key,
                           String uploadId,
                           int partNumber,
                           InputStream inputStream,
                           long partSize)

  - ### 方法详细资料

    - #### setInputStream

          public void setInputStream(InputStream inputStream)

      Sets the data stream for the part.
      参数:
        `inputStream` - The part's data stream.

    - #### getInputStream

          public InputStream getInputStream()

      Gets the data stream for the part.
      返回:
        The part's data stream.

    - #### getUploadId

          public String getUploadId()

      Gets the multipart upload Id.
      返回:
        The multipart upload Id.

    - #### setUploadId

          public void setUploadId(String uploadId)

      Sets the multipart upload Id.
      参数:
        `uploadId` - The multipart upload Id.

    - #### getPartNumber

          public int getPartNumber()

      Gets the part number. For every part to upload, it has a number whose range comes from 1 to 10000. For the given upload Id, the part number is unique and uploading the data with an existing part number would lead to the old data being overwritten.
      返回:
        Part number.

    - #### setPartNumber

          public void setPartNumber(int partNumber)

      Sets the part number. For every part to upload, it has a number whose range comes from 1 to 10000. For the given upload Id, the part number is unique and uploading the data with an existing part number would lead to the old data being overwritten.
      参数:
        `partNumber` - Part number.

    - #### getPartSize

          public long getPartSize()

      Gets the part size. The minimal part size is 100KB except the last part. Note: the UploadPartCopyRequest's minimal part size is 5MB.

      If the part size is -1, then it means the size is unknown. And it will use chunked transfer encoding to upload the part's data.

      返回:
        Part size.

    - #### setPartSize

          public void setPartSize(long partSize)

      Sets the part size. The minimal part size is 100KB except the last part. Note: the UploadPartCopyRequest's minimal part size is 5MB.

      If the part size is -1, then it means the size is unknown. And it will use chunked transfer encoding to upload the part's data.

      参数:
        `partSize` - Part size.

    - #### getMd5Digest

          public String getMd5Digest()

      Gets the part's MD5 value.
      返回:
        Part's MD5 value.

    - #### setMd5Digest

          public void setMd5Digest(String md5Digest)

      Sets the part's MD5 value.
      参数:
        `md5Digest` - Part's MD5 value.

    - #### isUseChunkEncoding

          public boolean isUseChunkEncoding()

      Gets the flag of using chunked transfer encoding.
      返回:
        true:using chunked transfer encoding

    - #### setUseChunkEncoding

          public void setUseChunkEncoding(boolean useChunkEncoding)

      Sets the flag of using chunked transfer encoding.
      参数:
        `useChunkEncoding` - true:using chunked transfer encoding

    - #### buildPartialStream

          public BoundedInputStream buildPartialStream()

    - #### setTrafficLimit

          public void setTrafficLimit(int trafficLimit)

      Sets traffic limit speed, its unit is bit/s

    - #### getTrafficLimit

          public int getTrafficLimit()

      Gets traffic limit speed, its unit is bit/s
      返回:
        traffic limit speed

Copyright © 2020. All Rights Reserved.