类 UploadPartRequest


  • public class UploadPartRequest
    extends GenericUploadRequest
    Contains the parameters used for the UploadPart operation on Baidu Bos.

    Required Parameters: BucketName, Key, UploadId, PartNumber

    • 构造器详细资料

      • UploadPartRequest

        public UploadPartRequest()
      • UploadPartRequest

        public UploadPartRequest​(String bucketName,
                                 String key,
                                 String uploadId,
                                 int partNumber,
                                 long partSize,
                                 InputStream inputStream)
        Constructs a new UploadPartRequest object to upload a stream of data to the specified bucket and key,
        参数:
        bucketName - The name of the bucket containing the initiated multipart upload with which this new part will be associated.
        key - The key of the initiated multipart upload.
        uploadId - The ID of an existing, initiated multipart upload, with which this new part will be associated.
        partNumber - The part number describing this part's position relative to the other parts in the multipart upload. Part number must be between 1 and 10,000 (inclusive).
        partSize - The size of this part, in bytes.
        inputStream - The stream containing the data to upload for the new part. Exactly one File or InputStream must be specified as the input to this operation.
    • 方法详细资料

      • getxBceCrc

        public String getxBceCrc()
        Gets xBceCrc of the newly uploaded part.
        返回:
        xBceCrc of the newly uploaded part.
      • setxBceCrc

        public void setxBceCrc​(String xBceCrc)
        Sets xBceCrc of the newly uploaded part.
        参数:
        xBceCrc - The xBceCrc of the newly uploaded part.
      • withBucketName

        public UploadPartRequest withBucketName​(String bucketName)
        Sets the name of the bucket containing the existing, initiated multipart upload, with which this new part will be associated, and returns this updated object so that additional method calls can be chained together.
        指定者:
        withBucketName 在类中 GenericBucketRequest
        参数:
        bucketName - the name of the bucket containing the existing, initiated multipart upload, with which this new part will be associated.
        返回:
        This updated UploadPartRequest object.
      • withKey

        public UploadPartRequest withKey​(String key)
        Sets the key of the initiated multipart upload, and returns this updated object so that additional method calls can be chained together.
        指定者:
        withKey 在类中 GenericObjectRequest
        参数:
        key - the key of the initiated multipart upload.
        返回:
        This updated UploadPartRequest object.
      • withUploadId

        public UploadPartRequest withUploadId​(String uploadId)
        Sets the ID of the existing, initiated multipart upload with which this new part will be associated, and returns this updated UploadPartRequest object so that additional method calls can be chained together.
        指定者:
        withUploadId 在类中 GenericUploadRequest
        参数:
        uploadId - the ID of the existing, initiated multipart upload with which this new part will be associated.
        返回:
        This updated UploadPartRequest object.
      • getPartNumber

        public int getPartNumber()
        Returns the part number describing this part's position relative to the other parts in the multipart upload. Part number must be between 1 and 10,000 (inclusive).
        返回:
        the part number describing this part's position relative to the other parts in the multipart upload. Part number must be between 1 and 10,000 (inclusive).
      • setPartNumber

        public void setPartNumber​(int partNumber)
        Sets the part number describing this part's position relative to the other parts in the multipart upload. Part number must be between 1 and 10,000 (inclusive).
        参数:
        partNumber - the part number describing this part's position relative to the other parts in the multipart upload. Part number must be between 1 and 10,000 (inclusive).
      • withPartNumber

        public UploadPartRequest withPartNumber​(int partNumber)
        Sets the part number describing this part's position relative to the other parts in the multipart upload. Part number must be between 1 and 10,000 (inclusive).

        Returns this updated UploadPartRequest object so that additional method calls can be chained together.

        参数:
        partNumber - the part number describing this part's position relative to the other parts in the multipart upload. Part number must be between 1 and 10,000 (inclusive).
        返回:
        This updated UploadPartRequest object.
      • getPartSize

        public long getPartSize()
        Returns the size of this part, in bytes.
        返回:
        the size of this part, in bytes.
      • setPartSize

        public void setPartSize​(long partSize)
        Sets the size of this part, in bytes.
        参数:
        partSize - the size of this part, in bytes.
      • withPartSize

        public UploadPartRequest withPartSize​(long partSize)
        Sets the size of this part, in bytes, and returns this updated UploadPartRequest object so that additional method calls can be chained together.
        参数:
        partSize - the size of this part, in bytes.
        返回:
        This updated UploadPartRequest object.
      • getMd5Digest

        public String getMd5Digest()
        Returns the optional, but recommended, MD5 hash of the content of this part. If specified, this value will be sent to Baidu Bos to verify the data integrity when the data reaches Baidu Bos.
        返回:
        The optional, but recommended, MD5 hash of the content of this part. If specified, this value will be sent to Baidu Bos to verify the data integrity when the data reaches Baidu Bos.
      • setMd5Digest

        public void setMd5Digest​(String md5Digest)
        Sets the optional, but recommended, MD5 hash of the content of this part. If specified, this value will be sent to Baidu Bos to verify the data integrity when the data reaches Baidu Bos.
        参数:
        md5Digest - The optional, but recommended, MD5 hash of the content of this part. If specified, this value will be sent to Baidu Bos to verify the data integrity when the data reaches Baidu Bos.
      • withMD5Digest

        public UploadPartRequest withMD5Digest​(String md5Digest)
        Sets the optional, but recommended, MD5 hash of the content of this part. If specified, this value will be sent to Baidu Bos to verify the data integrity when the data reaches Baidu Bos.

        Returns this updated UploadPartRequest object so that additional method calls can be chained together.

        参数:
        md5Digest - The optional, but recommended, MD5 hash of the content of this part. If specified, this value will be sent to Baidu Bos to verify the data integrity when the data reaches Baidu Bos.
        返回:
        This updated UploadPartRequest object.
      • getInputStream

        public InputStream getInputStream()
        Returns the stream containing the data to upload for the new part.
        返回:
        the stream containing the data to upload for the new part.
      • setInputStream

        public void setInputStream​(InputStream inputStream)
        Sets the stream containing the data to upload for the new part.
        参数:
        inputStream - the stream containing the data to upload for the new part.
      • withInputStream

        public UploadPartRequest withInputStream​(InputStream inputStream)
        Sets the stream containing the data to upload for the new part, and returns this updated object so that additional method calls can be chained together.
        参数:
        inputStream - the stream containing the data to upload for the new part.
        返回:
        The updated UploadPartRequest object.
      • getProgressCallback

        public BosProgressCallback getProgressCallback()
        Gets the BosProgressCallback which used for Get upload progress.
        返回:
        The BosProgressCallback which used for get progress information.
      • setProgressCallback

        public void setProgressCallback​(BosProgressCallback progressCallback)
        Sets the BosProgressCallback which used for Get upload progress.
        参数:
        progressCallback - The BosProgressCallback, which used for get progress information.
      • withProgressCallback

        public UploadPartRequest withProgressCallback​(BosProgressCallback progressCallback)
        参数:
        progressCallback - The BosProgressCallback, which used for get progress information.
        返回:
        This UploadPartRequest, so that additional method calls can be chained together
      • getTrafficLimitBitPS

        public long getTrafficLimitBitPS()
        Gets the limit of put object speed.
        返回:
        the limit of put object speed. unit: bit/s
      • setTrafficLimitBitPS

        public void setTrafficLimitBitPS​(long trafficLimitBitPS)
        Sets Gets the limit of put object speed. range: 819200 bit/s ~ 838860800 bit/s
        参数:
        trafficLimitBitPS - the limit of put object speed. unit: bit/s
      • withTrafficLimitBitPS

        public UploadPartRequest withTrafficLimitBitPS​(long trafficLimitBitPS)
        参数:
        trafficLimitBitPS - the limit of put object speed. unit: bit/s, range: 819200 bit/s ~ 838860800 bit/s
        返回:
        This PutObjectRequest, so that additional method calls can be chained together