public class PutObjectRequest extends PutObjectBasicRequest
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected int |
expires |
|
protected File |
file |
|
protected InputStream |
input |
|
protected ObjectMetadata |
metadata |
|
protected long |
offset |
acl, extensionPermissionMap, sseCHeader, sseKmsHeader, successRedirectLocationencodeHeaders, isIgnorePort, objectKeybucketName, cancelHandler, httpMethod, userHeaders| 构造器 | 说明 |
|---|---|
PutObjectRequest() |
|
PutObjectRequest(PutObjectBasicRequest request) |
|
PutObjectRequest(String bucketName) |
|
PutObjectRequest(String bucketName,
String objectKey) |
Constructor
|
PutObjectRequest(String bucketName,
String objectKey,
File file) |
Constructor
|
PutObjectRequest(String bucketName,
String objectKey,
InputStream input) |
Constructor
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
Callback |
getCallback() |
|
int |
getExpires() |
Obtain the expiration time of the object.
|
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.
|
ObjectMetadata |
getMetadata() |
Obtain object properties, including "content-type", "content-length",
"content-md5", and customized metadata.
|
long |
getOffset() |
Obtain the start position of the to-be-uploaded content in the file.
|
long |
getProgressInterval() |
Obtain the callback threshold of the data transfer listener.
|
ProgressListener |
getProgressListener() |
Obtain the data transfer listener.
|
boolean |
isAutoClose() |
Check whether the input stream will be automatically closed.
|
boolean |
isNeedCalculateCRC64() |
|
void |
setAutoClose(boolean autoClose) |
Specify whether to automatically close the input stream.
|
void |
setCallback(Callback callback) |
|
void |
setExpires(int expires) |
Set the expiration time of the object.
|
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 |
setMetadata(ObjectMetadata metadata) |
Set the object properties, including "content-type", "content-length",
and customized metadata.
|
void |
setNeedCalculateCRC64(boolean needCalculateCRC64) |
|
void |
setOffset(long offset) |
Set the start position of the to-be-uploaded content in the file.
|
void |
setProgressInterval(long progressInterval) |
Set the callback threshold of the data transfer listener.
|
void |
setProgressListener(ProgressListener progressListener) |
Set the data transfer listener.
|
String |
toString() |
getAcl, getAllGrantPermissions, getDomainIdsByGrantPermission, getExtensionPermissionMap, getGrantPermissionsByDomainId, getSseCHeader, getSseKmsHeader, getSuccessRedirectLocation, grantExtensionPermission, setAcl, setExtensionPermissionMap, setSseCHeader, setSseKmsHeader, setSuccessRedirectLocation, withdrawExtensionPermission, withdrawExtensionPermissionsgetIsIgnorePort, getObjectKey, isEncodeHeaders, setIsEncodeHeaders, setIsIgnorePort, setObjectKeyaddUserHeaders, getBucketName, getCancelHandler, getHttpMethod, getUserHeaders, isRequesterPays, setBucketName, setCancelHandler, setRequesterPays, setUserHeadersprotected File file
protected InputStream input
protected ObjectMetadata metadata
protected int expires
protected long offset
public PutObjectRequest()
public PutObjectRequest(String bucketName)
public PutObjectRequest(PutObjectBasicRequest request)
public PutObjectRequest(String bucketName, String objectKey)
bucketName - Bucket nameobjectKey - Object namepublic PutObjectRequest(String bucketName, String objectKey, File file)
bucketName - Bucket nameobjectKey - Object namefile - File to be uploadedpublic PutObjectRequest(String bucketName, String objectKey, InputStream input)
bucketName - Bucket nameobjectKey - Object nameinput - Data stream to be uploadedpublic long getOffset()
public void setOffset(long offset)
offset - Start position of the content to be uploaded in the local filepublic InputStream getInput()
public void setInput(InputStream input)
input - Data stream to be uploadedpublic ObjectMetadata getMetadata()
public void setMetadata(ObjectMetadata metadata)
metadata - Object propertiespublic File getFile()
public void setFile(File file)
file - File to be uploadedpublic int getExpires()
public void setExpires(int expires)
expires - Expiration time of the objectpublic 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 Callback getCallback()
public void setCallback(Callback callback)
public boolean isNeedCalculateCRC64()
public void setNeedCalculateCRC64(boolean needCalculateCRC64)
needCalculateCRC64 - Whether you need sdk to calculate CRC64 value and add it to headerpublic String toString()
toString 在类中 BaseObjectRequestCopyright © 2025. All rights reserved.