public class UploadPartRequest extends GenericRequest
| 构造器和说明 |
|---|
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() |
isRequesterPays, setRequesterPayspublic UploadPartRequest()
public UploadPartRequest(String bucketName, String objectKey)
bucketName - Name of the bucket to which the multipart upload belongsobjectKey - Name of the object involved in the multipart uploadpublic UploadPartRequest(String bucketName, String objectKey, String fileName)
bucketName - Name of the bucket to which the multipart upload belongsobjectKey - Name of the object involved in the multipart uploadfileName - File name to be uploadedpublic UploadPartRequest(String bucketName, String objectKey, File file)
bucketName - Name of the bucket to which the multipart upload belongsobjectKey - Name of the object involved in the multipart uploadfile - File to be uploadedpublic UploadPartRequest(String bucketName, String objectKey, Long partSize, InputStream input)
bucketName - Name of the bucket to which the multipart upload belongsobjectKey - Name of the object involved in the multipart uploadpartSize - Part size (in bytes)input - Data stream to be uploadedpublic UploadPartRequest(String bucketName, String objectKey, Long partSize, long offset, File file)
bucketName - Name of the bucket to which the multipart upload belongsobjectKey - Name of the object involved in the multipart uploadpartSize - Part size (in bytes)offset - Offset of the part in the file. The default value is 0 (in
bytes).file - File to be uploadedpublic SseCHeader getSseCHeader()
public void setSseCHeader(SseCHeader sseCHeader)
sseCHeader - SSE-C encryption headerspublic long getOffset()
public void setOffset(long offset)
offset - Offset of the part in the filepublic int getPartNumber()
public void setPartNumber(int partNumber)
partNumber - Part numberpublic String getUploadId()
public void setUploadId(String uploadId)
uploadId - Multipart upload IDpublic String getBucketName()
public void setBucketName(String bucketName)
bucketName - Name of the bucket to which the multipart upload belongspublic String getObjectKey()
public void setObjectKey(String objectKey)
objectKey - Name of the object involved in the multipart uploadpublic void setPartSize(Long partSize)
partSize - Part sizepublic Long getPartSize()
public File getFile()
public void setFile(File file)
file - File to be uploadedpublic InputStream getInput()
public void setInput(InputStream input)
input - Data stream to be uploadedpublic boolean isAttachMd5()
public void setAttachMd5(boolean attachMd5)
attachMd5 - Identifier specifying whether to automatically calculate the
MD5 value of the data to be uploadedpublic String getContentMd5()
public void setContentMd5(String contentMd5)
contentMd5 - MD5 value of the data to be uploadedpublic boolean isAutoClose()
public void setAutoClose(boolean autoClose)
autoClose - Identifier specifying whether the input stream will be
automatically closedpublic ProgressListener getProgressListener()
public void setProgressListener(ProgressListener progressListener)
progressListener - Data transfer listenerpublic long getProgressInterval()
public void setProgressInterval(long progressInterval)
progressInterval - Callback threshold of the data transfer listenerpublic String toString()
toString 在类中 GenericRequestCopyright © 2021. All rights reserved.