Interface Download
- All Superinterfaces:
Transfer
Represents an asynchronous download from Amazon S3.
See TransferManager
for more information about creating transfers.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.amazonaws.services.s3.transfer.Transfer
Transfer.TransferState
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
Cancels this download.The name of the bucket where the object is being downloaded from.getKey()
The key under which this object was stored in Amazon S3.Returns the ObjectMetadata for the object being downloaded.pause()
Pause the current download operation and returns the information that can be used to resume the download at a later time.Methods inherited from interface com.amazonaws.services.s3.transfer.Transfer
addProgressListener, addProgressListener, getDescription, getProgress, getState, isDone, removeProgressListener, removeProgressListener, waitForCompletion, waitForException
-
Method Details
-
getObjectMetadata
ObjectMetadata getObjectMetadata()Returns the ObjectMetadata for the object being downloaded.- Returns:
- The ObjectMetadata for the object being downloaded.
-
getBucketName
String getBucketName()The name of the bucket where the object is being downloaded from.- Returns:
- The name of the bucket where the object is being downloaded from.
-
getKey
String getKey()The key under which this object was stored in Amazon S3.- Returns:
- The key under which this object was stored in Amazon S3.
-
abort
Cancels this download.- Throws:
IOException
-
pause
Pause the current download operation and returns the information that can be used to resume the download at a later time. Resuming a download would not perform ETag check as range get is performed for downloading the object's remaining contents. Resuming a download for an object encrypted usingCryptoMode.StrictAuthenticatedEncryption
would result in AmazonClientException as authenticity cannot be guaranteed for a range get operation.- Throws:
PauseException
- If any errors were encountered while trying to pause the download.
-