public class UploadPartRequest extends GenericUploadRequest
Required Parameters: BucketName, Key, UploadId, PartNumber
trafficLimitBitPS| Constructor and Description |
|---|
UploadPartRequest() |
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,
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Returns the stream containing the data to upload for the new part.
|
String |
getMd5Digest()
Returns the optional, but recommended, MD5 hash of the content of this
part.
|
int |
getPartNumber()
Returns the part number describing this part's position relative to the
other parts in the multipart upload.
|
long |
getPartSize()
Returns the size of this part, in bytes.
|
BosProgressCallback |
getProgressCallback()
Gets the BosProgressCallback which used for Get upload progress.
|
long |
getTrafficLimitBitPS()
Gets the limit of put object speed.
|
String |
getxBceCrc()
Gets xBceCrc of the newly uploaded part.
|
String |
getxBceCrc32c()
Gets xBceCrc32c of the newly uploaded part.
|
boolean |
getxBceCrc32cFlag()
Gets xBceCrc32cFlag of the newly uploaded part.
|
void |
setInputStream(InputStream inputStream)
Sets the stream containing the data to upload for the new part.
|
void |
setMd5Digest(String md5Digest)
Sets the optional, but recommended, MD5 hash of the content of this part.
|
void |
setPartNumber(int partNumber)
Sets the part number describing this part's position relative to the
other parts in the multipart upload.
|
void |
setPartSize(long partSize)
Sets the size of this part, in bytes.
|
void |
setProgressCallback(BosProgressCallback progressCallback)
Sets the BosProgressCallback which used for Get upload progress.
|
void |
setTrafficLimitBitPS(long trafficLimitBitPS)
Sets Gets the limit of put object speed.
|
void |
setxBceCrc(String xBceCrc)
Sets xBceCrc of the newly uploaded part.
|
void |
setxBceCrc32c(String xBceCrc32c)
Sets xBceCrc32c of the newly uploaded part.
|
void |
setxBceCrc32cFlag(boolean xBceCrc32cFlag)
Sets xBceCrc32cFlag of the newly uploaded part.
|
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.
|
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.
|
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.
|
UploadPartRequest |
withMD5Digest(String md5Digest)
Sets the optional, but recommended, MD5 hash of the content of this part.
|
UploadPartRequest |
withPartNumber(int partNumber)
Sets the part number describing this part's position relative to the
other parts in the multipart upload.
|
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.
|
UploadPartRequest |
withProgressCallback(BosProgressCallback progressCallback) |
UploadPartRequest |
withRequestCredentials(BceCredentials credentials) |
UploadPartRequest |
withTrafficLimitBitPS(long trafficLimitBitPS) |
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.
|
getUploadId, setUploadIdgetKey, setKeygetBucketName, setBucketNamegetRequestCredentials, setRequestCredentialspublic UploadPartRequest()
public UploadPartRequest(String bucketName, String key, String uploadId, int partNumber, long partSize, InputStream inputStream)
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.public String getxBceCrc()
public void setxBceCrc(String xBceCrc)
xBceCrc - The xBceCrc of the newly uploaded part.public UploadPartRequest withRequestCredentials(BceCredentials credentials)
withRequestCredentials in class AbstractBceRequestpublic UploadPartRequest withBucketName(String bucketName)
withBucketName in class GenericBucketRequestbucketName - the name of the bucket containing the existing, initiated
multipart upload, with which this new part will be associated.public UploadPartRequest withKey(String key)
withKey in class GenericObjectRequestkey - the key of the initiated multipart upload.public UploadPartRequest withUploadId(String uploadId)
withUploadId in class GenericUploadRequestuploadId - the ID of the existing, initiated multipart upload with which
this new part will be associated.public int getPartNumber()
public void setPartNumber(int partNumber)
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).public UploadPartRequest withPartNumber(int partNumber)
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).public long getPartSize()
public void setPartSize(long partSize)
partSize - the size of this part, in bytes.public UploadPartRequest withPartSize(long partSize)
partSize - the size of this part, in bytes.public String getMd5Digest()
public void setMd5Digest(String md5Digest)
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.public UploadPartRequest withMD5Digest(String md5Digest)
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.public InputStream getInputStream()
public void setInputStream(InputStream inputStream)
inputStream - the stream containing the data to upload for the new part.public UploadPartRequest withInputStream(InputStream inputStream)
inputStream - the stream containing the data to upload for the new part.public BosProgressCallback getProgressCallback()
public void setProgressCallback(BosProgressCallback progressCallback)
progressCallback - The BosProgressCallback, which used for get progress information.public UploadPartRequest withProgressCallback(BosProgressCallback progressCallback)
progressCallback - The BosProgressCallback, which used for get progress information.public long getTrafficLimitBitPS()
public void setTrafficLimitBitPS(long trafficLimitBitPS)
trafficLimitBitPS - the limit of put object speed. unit: bit/spublic UploadPartRequest withTrafficLimitBitPS(long trafficLimitBitPS)
trafficLimitBitPS - the limit of put object speed. unit: bit/s, range: 819200 bit/s ~ 838860800 bit/spublic String getxBceCrc32c()
public void setxBceCrc32c(String xBceCrc32c)
xBceCrc32c - The xBceCrc of the newly uploaded part.public boolean getxBceCrc32cFlag()
public void setxBceCrc32cFlag(boolean xBceCrc32cFlag)
xBceCrc32cFlag - whether to calculate crc32cCopyright © 2024. All rights reserved.