What's New?
| Change | Description |
|---|---|
| Amazon S3 Multipart Upload |
Multipart upload allows you to upload a single object as a set of parts. Each part is a contiguous portion of the object's data.
You can upload these object parts independently and in any order. If transmission of any part fails, you can retransmit that part without
affecting other parts. After all parts of your object are uploaded, Amazon S3 assembles these parts and creates the object.
In addition to a new high-level TransferManager class, which abstracts out the logic for multipart uploads, the AWS SDK for Java includes six new operations for working with the new Amazon S3 multipart upload API:
|
| Amazon S3 TransferManager |
The new Amazon S3
TransferManager
class provides an asynchronous, higher level interface for uploading data to Amazon S3.
Developers can submit uploads to TransferManager, then continue working while TransferManager asynchronously processes the
upload.
TransferManager will automatically switch over to use multipart uploads past a configurable size threshold. When uploading files, TransferManager will automatically upload multiple parts of the file in parallel for better throughput. Over time, TransferManager will be extended with additional high level functionality for both uploads and downloads. The AmazonS3TransferProgress sample included in the AWS SDK for Java demonstrates how to use TransferManager and how to track progress for uploads. Using TransferManager to upload data to Amazon S3 is easy:
AWSCredentials myCredentials = new BasicAWSCredentials(...);
TransferManager tm = new TransferManager(myCredentials);
Transfer myUpload = tm.upload(myBucket, myFile.getName(), myFile);
// You can keep doing work while the transfer uploads in the background
while (myUpload.isDone() == false) {
System.out.println("Transfer: " + myUpload.getDescription());
System.out.println(" - Status: " + myUpload.getStatus());
System.out.println(" - Progress: " + myUpload.getProgress().getBytesTransfered());
// Do work while we wait for our upload to complete...
Thread.sleep(500);
}
// Or you can simply wait for the transfer to finish
// if you don't need to do more work
myUpload.waitForCompletion();
|
| Amazon S3 Progress Notifications | In addition to accessing transfer progress with TransferManager, as described above, you can now specify a ProgressListener implementation as part of PutObjectRequest. This listener interface is periodically notified that bytes have been transfered. Developers can use this for visibility into how uploads are progressing. |
| Bug Fixes |
|
Supported API Versions
The AWS SDK for Java supports the following API versions:
| Service | API Version |
|---|---|
| Amazon EC2 | 2010-08-31 |
| Amazon S3 | 2006-03-01 |
| Amazon SimpleDB | 2009-04-15 |
| Amazon RDS | 2010-07-28 |
| Amazon SQS | 2009-02-01 |
| Amazon Elastic MapReduce | 2009-03-31 |
| Amazon CloudWatch | 2009-05-15 |
| Amazon Elastic LoadBalancing | 2010-07-01 |
| Amazon Auto Scaling | 2009-05-15 |
| Amazon Simple Notification Service | 2010-03-31 |
| AWS Import/Export | 2010-06-01 |
| AWS Identity and Access Management | 2010-05-08 |
Download the AWS SDK for Java from http://aws.amazon.com/sdkforjava/.