public class PutObjectRequest extends PutObjectBasicRequest
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
expires |
protected File |
file |
protected InputStream |
input |
protected ObjectMetadata |
metadata |
protected long |
offset |
acl, bucketName, extensionPermissionMap, objectKey, sseCHeader, sseKmsHeader, successRedirectLocation| 构造器和说明 |
|---|
PutObjectRequest() |
PutObjectRequest(PutObjectBasicRequest request) |
PutObjectRequest(String bucketName,
String objectKey)
Constructor
|
PutObjectRequest(String bucketName,
String objectKey,
File file)
Constructor
|
PutObjectRequest(String bucketName,
String objectKey,
InputStream input)
Constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
void |
setAutoClose(boolean autoClose)
Specify whether to automatically close the input stream.
|
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 |
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, getBucketName, getDomainIdsByGrantPermission, getExtensionPermissionMap, getGrantPermissionsByDomainId, getObjectKey, getSseCHeader, getSseKmsHeader, getSuccessRedirectLocation, grantExtensionPermission, setAcl, setBucketName, setExtensionPermissionMap, setObjectKey, setSseCHeader, setSseKmsHeader, setSuccessRedirectLocation, withdrawExtensionPermission, withdrawExtensionPermissionsisRequesterPays, setRequesterPaysprotected File file
protected InputStream input
protected ObjectMetadata metadata
protected int expires
protected long offset
public PutObjectRequest()
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 String toString()
toString 在类中 GenericRequestCopyright © 2021. All rights reserved.