类 PutObjectRequest
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.PutObjectBasicRequest
cn.warpin.thirdPart.huawei.obs.obs.services.model.PutObjectRequest
- 直接已知子类:
AppendObjectRequest,NewFileRequest
Parameters in an object upload request
-
字段概要
字段修饰符和类型字段说明private booleanprivate Callbackprotected intprotected Fileprotected InputStreamprotected ObjectMetadataprotected longprivate longprivate ProgressListener从类继承的字段 cn.warpin.thirdPart.huawei.obs.obs.services.model.PutObjectBasicRequest
acl, extensionPermissionMap, sseCHeader, sseKmsHeader, successRedirectLocation从类继承的字段 cn.warpin.thirdPart.huawei.obs.obs.services.model.BaseObjectRequest
encodeHeaders, isIgnorePort, objectKey从类继承的字段 cn.warpin.thirdPart.huawei.obs.obs.services.model.GenericRequest
bucketName, httpMethod, userHeaders -
构造器概要
构造器构造器说明PutObjectRequest(PutObjectBasicRequest request) PutObjectRequest(String bucketName) PutObjectRequest(String bucketName, String objectKey) ConstructorPutObjectRequest(String bucketName, String objectKey, File file) ConstructorPutObjectRequest(String bucketName, String objectKey, InputStream input) Constructor -
方法概要
修饰符和类型方法说明intObtain the expiration time of the object.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.Obtain object properties, including "content-type", "content-length", "content-md5", and customized metadata.longObtain the start position of the to-be-uploaded content in the file.longObtain the callback threshold of the data transfer listener.Obtain the data transfer listener.booleanCheck whether the input stream will be automatically closed.voidsetAutoClose(boolean autoClose) Specify whether to automatically close the input stream.voidsetCallback(Callback callback) voidsetExpires(int expires) Set the expiration time of the object.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.voidsetMetadata(ObjectMetadata metadata) Set the object properties, including "content-type", "content-length", and customized metadata.voidsetOffset(long offset) Set the start position of the to-be-uploaded content in the file.voidsetProgressInterval(long progressInterval) Set the callback threshold of the data transfer listener.voidsetProgressListener(ProgressListener progressListener) Set the data transfer listener.toString()从类继承的方法 cn.warpin.thirdPart.huawei.obs.obs.services.model.PutObjectBasicRequest
getAcl, getAllGrantPermissions, getDomainIdsByGrantPermission, getExtensionPermissionMap, getGrantPermissionsByDomainId, getSseCHeader, getSseKmsHeader, getSuccessRedirectLocation, grantExtensionPermission, setAcl, setExtensionPermissionMap, setSseCHeader, setSseKmsHeader, setSuccessRedirectLocation, withdrawExtensionPermission, withdrawExtensionPermissions从类继承的方法 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
-
字段详细资料
-
file
-
input
-
metadata
-
expires
protected int expires -
offset
protected long offset -
autoClose
private boolean autoClose -
progressListener
-
progressInterval
private long progressInterval -
callback
-
-
构造器详细资料
-
PutObjectRequest
public PutObjectRequest() -
PutObjectRequest
-
PutObjectRequest
-
PutObjectRequest
Constructor- 参数:
bucketName- Bucket nameobjectKey- Object name
-
PutObjectRequest
Constructor- 参数:
bucketName- Bucket nameobjectKey- Object namefile- File to be uploaded
-
PutObjectRequest
Constructor- 参数:
bucketName- Bucket nameobjectKey- Object nameinput- Data stream to be uploaded
-
-
方法详细资料
-
getOffset
public long getOffset()Obtain 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.- 返回:
- Start position of the content to be uploaded in the local 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- Start position of the content to be uploaded in the local file
-
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
-
getMetadata
Obtain object properties, including "content-type", "content-length", "content-md5", and customized metadata.- 返回:
- Object properties
-
setMetadata
Set the object properties, including "content-type", "content-length", and customized metadata.- 参数:
metadata- Object properties
-
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
-
getExpires
public int getExpires()Obtain the expiration time of the object.- 返回:
- Expiration time of the object
-
setExpires
public void setExpires(int expires) Set the expiration time of the object. The value must be a positive integer.- 参数:
expires- Expiration time of the object
-
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
-
getCallback
-
setCallback
-
toString
- 覆盖:
toString在类中BaseObjectRequest
-