public class PutObjectRelaxRequest extends SCSWebServiceRequest
构造器和说明 |
---|
PutObjectRelaxRequest(String bucketName,
String key,
String fileSha1,
long fileLength)
创建秒传请求对象
|
PutObjectRelaxRequest(String bucketName,
String key,
String fileSha1,
long fileLength,
CannedAccessControlList cannedAcl) |
限定符和类型 | 方法和说明 |
---|---|
String |
getBucketName()
Gets the name of the existing bucket where this request will
upload a new object to.
|
CannedAccessControlList |
getCannedAcl()
Gets the optional pre-configured access control policy to use for the
new object.
|
long |
getFileLength() |
String |
getFileSha1() |
ProgressListener |
getGeneralProgressListener()
Returns the optional progress listener for receiving updates about object
download status.
|
String |
getKey()
Gets the key under which to store the new object.
|
ObjectMetadata |
getMetadata()
Gets the optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g. custom user metadata, hooks for specifying content
type, etc.).
|
ProgressListener |
getProgressListener()
已过时。
use
getGeneralProgressListener() instead. |
void |
setBucketName(String bucketName)
Sets the name of an existing bucket where this request will
upload a new object to.
|
void |
setCannedAcl(CannedAccessControlList cannedAcl)
Sets the optional pre-configured access control policy to use for the new
object.
|
void |
setFileLength(long fileLength) |
void |
setFileSha1(String fileSha1) |
void |
setGeneralProgressListener(ProgressListener generalProgressListener)
Sets the optional progress listener for receiving updates about object
download status.
|
void |
setKey(String key)
Sets the key under which to store the new object.
|
void |
setMetadata(ObjectMetadata metadata)
Sets the optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g. custom user metadata, hooks for specifying content
type, etc.).
|
void |
setProgressListener(ProgressListener progressListener)
已过时。
use
setGeneralProgressListener(ProgressListener) instead. |
PutObjectRelaxRequest |
withBucketName(String bucketName)
Sets the name of the bucket where this request will upload a new
object to.
|
PutObjectRelaxRequest |
withCannedAcl(CannedAccessControlList cannedAcl)
Sets the optional pre-configured access control policy to use for the new
object.
|
PutObjectRelaxRequest |
withGeneralProgressListener(ProgressListener generalProgressListener)
Sets the optional progress listener for receiving updates about object
upload status, and returns this updated object so that additional method
calls can be chained together.
|
PutObjectRelaxRequest |
withKey(String key)
Sets the key under which to store the new object.
|
PutObjectRelaxRequest |
withMetadata(ObjectMetadata metadata)
Sets the optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g. custom user metadata, hooks for specifying content
type, etc.).
|
PutObjectRelaxRequest |
withProgressListener(ProgressListener progressListener)
已过时。
use
withGeneralProgressListener(ProgressListener) instead. |
public PutObjectRelaxRequest(String bucketName, String key, String fileSha1, long fileLength)
bucketName
- key
- fileSha1
- 文件sha1值fileLength
- 文件大小public PutObjectRelaxRequest(String bucketName, String key, String fileSha1, long fileLength, CannedAccessControlList cannedAcl)
public String getFileSha1()
public void setFileSha1(String fileSha1)
public long getFileLength()
public void setFileLength(long fileLength)
public String getBucketName()
Permission.Write
permission granted.setBucketName(String)
,
withBucketName(String)
public void setBucketName(String bucketName)
Permission.Write
permission granted.bucketName
- The name of an existing bucket where this request will
upload a new object to.
In order to upload the object,
users must have Permission.Write
permission granted.getBucketName()
,
withBucketName(String)
public PutObjectRelaxRequest withBucketName(String bucketName)
In order to upload the object,
users must have Permission.Write
permission granted.
bucketName
- The name of an existing bucket where this request will
upload a new object to.
In order to upload the object,
users must have Permission.Write
permission granted.PutObjectRelaxRequest
, enabling additional method calls to be
chained together.getBucketName()
,
setBucketName(String)
public String getKey()
setKey(String)
,
withKey(String)
public void setKey(String key)
key
- The key under which to store the new object.getKey()
,
withKey(String)
public PutObjectRelaxRequest withKey(String key)
key
- The key under which to store the new object.PutObjectRelaxRequest
, enabling additional method calls to be
chained together.getKey()
,
setKey(String)
public ObjectMetadata getMetadata()
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Amazon S3. This can cause very negative performance impacts.
setMetadata(ObjectMetadata)
,
withMetadata(ObjectMetadata)
public void setMetadata(ObjectMetadata metadata)
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Amazon S3. This can cause very negative performance impacts.
metadata
- The optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g. custom user metadata, hooks for specifying
content type, etc.).getMetadata()
,
withMetadata(ObjectMetadata)
public PutObjectRelaxRequest withMetadata(ObjectMetadata metadata)
PutObjectRelaxRequest
, enabling additional method
calls to be chained together.
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Amazon S3. This can cause very negative performance impacts.
metadata
- The optional metadata instructing Amazon S3 how to handle the
uploaded data (e.g. custom user metadata, hooks for specifying
content type, etc.).PutObjectRelaxRequest
, enabling additional method
calls to be chained together.getMetadata()
,
setMetadata(ObjectMetadata)
public CannedAccessControlList getCannedAcl()
setCannedAcl(CannedAccessControlList)
,
withCannedAcl(CannedAccessControlList)
public void setCannedAcl(CannedAccessControlList cannedAcl)
cannedAcl
- The optional pre-configured access control policy to use for
the new object.getCannedAcl()
,
withCannedAcl(CannedAccessControlList)
public PutObjectRelaxRequest withCannedAcl(CannedAccessControlList cannedAcl)
PutObjectRelaxRequest
, enabling additional method
calls to be chained together.cannedAcl
- The optional pre-configured access control policy to use for
the new object.PutObjectRelaxRequest
, enabling additional method
calls to be chained together.getCannedAcl()
,
setCannedAcl(CannedAccessControlList)
@Deprecated public void setProgressListener(ProgressListener progressListener)
setGeneralProgressListener(ProgressListener)
instead.progressListener
- The legacy progress listener that is used exclusively for Amazon S3 client.@Deprecated public ProgressListener getProgressListener()
getGeneralProgressListener()
instead.@Deprecated public PutObjectRelaxRequest withProgressListener(ProgressListener progressListener)
withGeneralProgressListener(ProgressListener)
instead.progressListener
- The legacy progress listener that is used exclusively for Amazon S3 client.public void setGeneralProgressListener(ProgressListener generalProgressListener)
generalProgressListener
- The new progress listener.public ProgressListener getGeneralProgressListener()
public PutObjectRelaxRequest withGeneralProgressListener(ProgressListener generalProgressListener)
generalProgressListener
- The new progress listener.Copyright © 2016. All rights reserved.