public class UploadPartRequest extends SCSWebServiceRequest
Required Parameters: BucketName, Key, UploadId, PartNumber
构造器和说明 |
---|
UploadPartRequest() |
限定符和类型 | 方法和说明 |
---|---|
String |
getBucketName()
Returns the name of the bucket containing the existing, initiated
multipart upload, with which this new part will be associated.
|
File |
getFile()
Returns the file containing the data to upload.
|
long |
getFileOffset()
Returns the optional offset in the specified file, at which to begin
uploading data for this part.
|
ProgressListener |
getGeneralProgressListener()
Returns the optional progress listener for receiving updates about object
download status.
|
InputStream |
getInputStream()
Returns the stream containing the data to upload for the new part.
|
String |
getKey()
Returns the key of the initiated multipart upload.
|
String |
getMd5Digest()
Returns the optional, but recommended, MD5 hash of the content of this
part.
|
int |
getPartNumber()
Returns the part number describing this part's position relative to the
other parts in the multipart upload.
|
long |
getPartSize()
Returns the size of this part, in bytes.
|
ProgressListener |
getProgressListener()
已过时。
use
getGeneralProgressListener() instead. |
String |
getUploadId()
Returns the ID of the existing, initiated multipart upload with which
this new part will be associated.
|
boolean |
isLastPart()
Returns true if the creator of this request has indicated this part is
the last part being uploaded in a multipart upload.
|
void |
setBucketName(String bucketName)
Sets the name of the bucket containing the existing, initiated multipart
upload, with which this new part will be associated.
|
void |
setFile(File file)
Sets the file containing the data to upload.
|
void |
setFileOffset(long fileOffset)
Sets the optional offset in the specified file, at which to begin
uploading data for this part.
|
void |
setGeneralProgressListener(ProgressListener generalProgressListener)
Sets the optional progress listener for receiving updates about object
download status.
|
void |
setInputStream(InputStream inputStream)
Sets the stream containing the data to upload for the new part.
|
void |
setKey(String key)
Sets the key of the initiated multipart upload.
|
void |
setLastPart(boolean isLastPart)
Marks this part as the last part being uploaded in a multipart upload.
|
void |
setMd5Digest(String md5Digest)
Sets the optional, but recommended, MD5 hash of the content of this part.
|
void |
setPartNumber(int partNumber)
Sets the part number describing this part's position relative to the
other parts in the multipart upload.
|
void |
setPartSize(long partSize)
Sets the size of this part, in bytes.
|
void |
setProgressListener(ProgressListener progressListener)
已过时。
use
setGeneralProgressListener(ProgressListener) instead. |
void |
setUploadId(String uploadId)
Sets the ID of the existing, initiated multipart upload with which this
new part will be associated.
|
UploadPartRequest |
withBucketName(String bucketName)
Sets the name of the bucket containing the existing, initiated multipart
upload, with which this new part will be associated, and returns this
updated object so that additional method calls can be chained together.
|
UploadPartRequest |
withFile(File file)
Sets the file containing the data to upload, and returns this updated
UploadPartRequest object so that additional method calls can be chained
together.
|
UploadPartRequest |
withFileOffset(long fileOffset)
Sets the optional offset in the specified file, at which to begin
uploading data for this part, and returns this updated UploadPartRequest
object so that additional method calls can be chained together.
|
UploadPartRequest |
withGeneralProgressListener(ProgressListener progressListener)
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.
|
UploadPartRequest |
withInputStream(InputStream inputStream)
Sets the stream containing the data to upload for the new part, and
returns this updated object so that additional method calls can be
chained together.
|
UploadPartRequest |
withKey(String key)
Sets the key of the initiated multipart upload, and returns this updated
object so that additional method calls can be chained together.
|
UploadPartRequest |
withLastPart(boolean isLastPart)
Marks this part as the last part being uploaded in a multipart upload,
and returns this updated request object so that additional method calls
can be chained together.
|
UploadPartRequest |
withMD5Digest(String md5Digest)
Sets the optional, but recommended, MD5 hash of the content of this part.
|
UploadPartRequest |
withPartNumber(int partNumber)
Sets the part number describing this part's position relative to the
other parts in the multipart upload.
|
UploadPartRequest |
withPartSize(long partSize)
Sets the size of this part, in bytes, and returns this updated
UploadPartRequest object so that additional method calls can be chained
together.
|
UploadPartRequest |
withProgressListener(ProgressListener progressListener)
已过时。
use
withGeneralProgressListener(ProgressListener) instead. |
UploadPartRequest |
withUploadId(String uploadId)
Sets the ID of the existing, initiated multipart upload with which this
new part will be associated, and returns this updated UploadPartRequest
object so that additional method calls can be chained together.
|
public void setInputStream(InputStream inputStream)
inputStream
- the stream containing the data to upload for the new part.public InputStream getInputStream()
public UploadPartRequest withInputStream(InputStream inputStream)
inputStream
- the stream containing the data to upload for the new part.public String getBucketName()
public void setBucketName(String bucketName)
bucketName
- the name of the bucket containing the existing, initiated
multipart upload, with which this new part will be associated.public UploadPartRequest withBucketName(String bucketName)
bucketName
- the name of the bucket containing the existing, initiated
multipart upload, with which this new part will be associated.public String getKey()
public void setKey(String key)
key
- the key of the initiated multipart upload.public UploadPartRequest withKey(String key)
key
- the key of the initiated multipart upload.public String getUploadId()
public void setUploadId(String uploadId)
uploadId
- the ID of the existing, initiated multipart upload with which
this new part will be associated.public UploadPartRequest withUploadId(String uploadId)
uploadId
- the ID of the existing, initiated multipart upload with which
this new part will be associated.public int getPartNumber()
public void setPartNumber(int partNumber)
partNumber
- the part number describing this part's position relative to
the other parts in the multipart upload. Part number must be
between 1 and 10,000 (inclusive).public UploadPartRequest withPartNumber(int partNumber)
Returns this updated UploadPartRequest object so that additional method calls can be chained together.
partNumber
- the part number describing this part's position relative to
the other parts in the multipart upload. Part number must be
between 1 and 10,000 (inclusive).public long getPartSize()
public void setPartSize(long partSize)
partSize
- the size of this part, in bytes.public UploadPartRequest withPartSize(long partSize)
partSize
- the size of this part, in bytes.public String getMd5Digest()
public void setMd5Digest(String md5Digest)
md5Digest
- The optional, but recommended, MD5 hash of the content of this
part. If specified, this value will be sent to Amazon S3 to
verify the data integrity when the data reaches Amazon S3.public UploadPartRequest withMD5Digest(String md5Digest)
Returns this updated UploadPartRequest object so that additional method calls can be chained together.
md5Digest
- The optional, but recommended, MD5 hash of the content of this
part. If specified, this value will be sent to Amazon S3 to
verify the data integrity when the data reaches Amazon S3.public File getFile()
public void setFile(File file)
file
- The file containing the data to upload. Exactly one File or
InputStream must be specified as the input to this operation.public UploadPartRequest withFile(File file)
Exactly one File or InputStream must be specified as the input to this operation.
file
- The file containing the data to upload. Exactly one File or
InputStream must be specified as the input to this operation.public long getFileOffset()
public void setFileOffset(long fileOffset)
fileOffset
- The optional offset in the specified file, at which to begin
uploading data for this part. If not specified, data will be
read from the beginning of the file.public UploadPartRequest withFileOffset(long fileOffset)
If not specified, data will be read from the beginning of the file.
fileOffset
- The optional offset in the specified file, at which to begin
uploading data for this part. If not specified, data will be
read from the beginning of the file.@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 UploadPartRequest withProgressListener(ProgressListener progressListener)
withGeneralProgressListener(ProgressListener)
instead.progressListener
- The legacy progress listener that is used exclusively for Amazon S3 client.public boolean isLastPart()
public void setLastPart(boolean isLastPart)
isLastPart
- Whether or not this is the last part being uploaded in a
multipart upload.public UploadPartRequest withLastPart(boolean isLastPart)
isLastPart
- Whether or not this is the last part being uploaded in a
multipart upload.public void setGeneralProgressListener(ProgressListener generalProgressListener)
generalProgressListener
- The new progress listener.public ProgressListener getGeneralProgressListener()
public UploadPartRequest withGeneralProgressListener(ProgressListener progressListener)
generalProgressListener
- The new progress listener.Copyright © 2016. All rights reserved.