类 UploadPartRequest
java.lang.Object
cn.warpin.thirdPart.huawei.obs.obs.services.model.GenericRequest
cn.warpin.thirdPart.huawei.obs.obs.services.model.BaseObjectRequest
cn.warpin.thirdPart.huawei.obs.obs.services.model.AbstractMultipartRequest
cn.warpin.thirdPart.huawei.obs.obs.services.model.UploadPartRequest
Parameters in a part upload request
-
字段概要
字段修饰符和类型字段说明private booleanprivate booleanprivate Stringprivate Fileprivate InputStreamprivate longprivate intprivate Longprivate longprivate ProgressListenerprivate SseCHeader从类继承的字段 cn.warpin.thirdPart.huawei.obs.obs.services.model.AbstractMultipartRequest
uploadId从类继承的字段 cn.warpin.thirdPart.huawei.obs.obs.services.model.BaseObjectRequest
encodeHeaders, isIgnorePort, objectKey从类继承的字段 cn.warpin.thirdPart.huawei.obs.obs.services.model.GenericRequest
bucketName, httpMethod, userHeaders -
构造器概要
构造器构造器说明UploadPartRequest(String bucketName, String objectKey) ConstructorUploadPartRequest(String bucketName, String objectKey, File file) ConstructorUploadPartRequest(String bucketName, String objectKey, Long partSize, long offset, File file) ConstructorUploadPartRequest(String bucketName, String objectKey, Long partSize, InputStream input) ConstructorUploadPartRequest(String bucketName, String objectKey, String fileName) Constructor -
方法概要
修饰符和类型方法说明Set the MD5 value of the data to be uploaded.getFile()Obtain the file to be uploaded, which cannot be used with the data stream.getInput()Obtain the data stream to be uploaded, which cannot be used with the file to be uploaded.longObtain the offset of the part in the file.intObtain the part number.Obtain the part size, in bytes.longObtain the callback threshold of the data transfer listener.Obtain the data transfer listener.Obtain SSE-C encryption headers.booleanCheck whether the MD5 value of the data to be uploaded will be automatically calculated.booleanCheck whether the input stream will be automatically closed.voidsetAttachMd5(boolean attachMd5) Specify whether to automatically calculate the MD5 value of the data to be uploaded.voidsetAutoClose(boolean autoClose) Specify whether to automatically close the input stream.voidsetContentMd5(String contentMd5) Obtain the MD5 value of the data to be uploaded.voidSet the file to be uploaded, which cannot be used with the data stream.voidsetInput(InputStream input) Set the data stream to be uploaded, which cannot be used with the file to be uploaded.voidsetOffset(long offset) Set the start position of the to-be-uploaded content in the file.voidsetPartNumber(int partNumber) Set the part number.voidsetPartSize(Long partSize) Set the part size (in bytes).voidsetProgressInterval(long progressInterval) Set the callback threshold of the data transfer listener.voidsetProgressListener(ProgressListener progressListener) Set the data transfer listener.voidsetSseCHeader(SseCHeader sseCHeader) Set SSE-C encryption headers.toString()从类继承的方法 cn.warpin.thirdPart.huawei.obs.obs.services.model.AbstractMultipartRequest
getUploadId, setUploadId从类继承的方法 cn.warpin.thirdPart.huawei.obs.obs.services.model.BaseObjectRequest
getIsIgnorePort, getObjectKey, isEncodeHeaders, setIsEncodeHeaders, setIsIgnorePort, setObjectKey从类继承的方法 cn.warpin.thirdPart.huawei.obs.obs.services.model.GenericRequest
addUserHeaders, getBucketName, getHttpMethod, getUserHeaders, isRequesterPays, setBucketName, setRequesterPays, setUserHeaders
-
字段详细资料
-
partNumber
private int partNumber -
partSize
-
offset
private long offset -
sseCHeader
-
contentMd5
-
attachMd5
private boolean attachMd5 -
file
-
input
-
autoClose
private boolean autoClose -
progressListener
-
progressInterval
private long progressInterval
-
-
构造器详细资料
-
UploadPartRequest
public UploadPartRequest() -
UploadPartRequest
Constructor- 参数:
bucketName- Name of the bucket to which the multipart upload belongsobjectKey- Name of the object involved in the multipart upload
-
UploadPartRequest
Constructor- 参数:
bucketName- Name of the bucket to which the multipart upload belongsobjectKey- Name of the object involved in the multipart uploadfileName- File name to be uploaded
-
UploadPartRequest
Constructor- 参数:
bucketName- Name of the bucket to which the multipart upload belongsobjectKey- Name of the object involved in the multipart uploadfile- File to be uploaded
-
UploadPartRequest
Constructor- 参数:
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 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 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 uploaded
-
-
方法详细资料
-
getSseCHeader
Obtain SSE-C encryption headers.- 返回:
- SSE-C encryption headers
-
setSseCHeader
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
-
setPartSize
Set the part size (in bytes).- 参数:
partSize- Part size
-
getPartSize
Obtain the part size, in bytes.- 返回:
- Part size
-
getFile
Obtain the file to be uploaded, which cannot be used with the data stream.- 返回:
- File to be uploaded
-
setFile
Set the file to be uploaded, which cannot be used with the data stream.- 参数:
file- File to be uploaded
-
getInput
Obtain the data stream to be uploaded, which cannot be used with the file to be uploaded.- 返回:
- Data stream to be uploaded
-
setInput
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
Set the MD5 value of the data to be uploaded.- 返回:
- MD5 value of the data to be uploaded
-
setContentMd5
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
Obtain the data transfer listener.- 返回:
- Data transfer listener
-
setProgressListener
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
- 覆盖:
toString在类中BaseObjectRequest
-