Interface Download
-
- All Superinterfaces:
Transfer
public interface Download extends Transfer
Represents an asynchronous download from Amazon S3.See
TransferManager
for more information about creating transfers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.amazonaws.services.s3.transfer.Transfer
Transfer.TransferState
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
abort()
Cancels this download.String
getBucketName()
The name of the bucket where the object is being downloaded from.String
getKey()
The key under which this object was stored in Amazon S3.ObjectMetadata
getObjectMetadata()
Returns the ObjectMetadata for the object being downloaded.PersistableDownload
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 Detail
-
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
void abort() throws IOException
Cancels this download.- Throws:
IOException
-
pause
PersistableDownload pause() throws PauseException
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.
-
-