public class DownloadImpl extends AbstractTransfer implements Download
Transfer.TransferState
Constructor and Description |
---|
DownloadImpl(String description,
TransferProgress transferProgress,
ProgressListenerChain progressListenerChain,
S3Object s3Object,
TransferStateChangeListener listener,
GetObjectRequest getObjectRequest,
File file)
Deprecated.
|
DownloadImpl(String description,
TransferProgress transferProgress,
ProgressListenerChain progressListenerChain,
S3Object s3Object,
TransferStateChangeListener listener,
GetObjectRequest getObjectRequest,
File file,
ObjectMetadata objectMetadata,
boolean isDownloadParallel) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Cancels this download.
|
void |
abortWithoutNotifyingStateChangeListener()
Cancels this download, but skip notifying the state change listeners.
|
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.
|
Long |
getLastFullyDownloadedFilePosition() |
Integer |
getLastFullyDownloadedPartNumber()
For parallel downloads, returns the last part number that was
successfully written into the download file.
|
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.
|
void |
setS3Object(S3Object s3Object)
Set the S3 object to download.
|
void |
setState(Transfer.TransferState state)
This method is also responsible for firing COMPLETED signal to the
listeners.
|
addProgressListener, addProgressListener, addStateChangeListener, getDescription, getMonitor, getProgress, getState, isDone, notifyStateChangeListeners, removeProgressListener, removeProgressListener, removeStateChangeListener, setMonitor, waitForCompletion, waitForException
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addProgressListener, addProgressListener, getDescription, getProgress, getState, isDone, removeProgressListener, removeProgressListener, waitForCompletion, waitForException
@Deprecated public DownloadImpl(String description, TransferProgress transferProgress, ProgressListenerChain progressListenerChain, S3Object s3Object, TransferStateChangeListener listener, GetObjectRequest getObjectRequest, File file)
public DownloadImpl(String description, TransferProgress transferProgress, ProgressListenerChain progressListenerChain, S3Object s3Object, TransferStateChangeListener listener, GetObjectRequest getObjectRequest, File file, ObjectMetadata objectMetadata, boolean isDownloadParallel)
public ObjectMetadata getObjectMetadata()
getObjectMetadata
in interface Download
public String getBucketName()
getBucketName
in interface Download
public String getKey()
public Integer getLastFullyDownloadedPartNumber()
public Long getLastFullyDownloadedFilePosition()
public void abort() throws IOException
abort
in interface AbortableTransfer
IOException
public void abortWithoutNotifyingStateChangeListener() throws IOException
IOException
public void setS3Object(S3Object s3Object)
public void setState(Transfer.TransferState state)
setState
in class AbstractTransfer
public PersistableDownload pause() throws PauseException
Download
CryptoMode.StrictAuthenticatedEncryption
would result in
AmazonClientException as authenticity cannot be guaranteed for a range
get operation.pause
in interface Download
PauseException
- If any errors were encountered while trying to pause the
download.