private Download doDownload(final GetObjectRequest getObjectRequest,
                                final File file, final TransferStateChangeListener stateListener,
                                final S3ProgressListener s3progressListener,
                                final boolean resumeExistingDownload,
                                final long timeoutMillis,
                                final PersistableDownload persistableDownload) {
        assertNotObjectLambdaArn(getObjectRequest.getBucketName(), "download");

        long lastModifiedTimeRecordedDuringPause = 0L;
        Integer lastFullyDownloadedPartNumber = null;
        Long lastFullyDownloadedFilePosition = null;
        String lastEtagDuringPause = null;

        if (persistableDownload != null) {
            lastModifiedTimeRecordedDuringPause = persistableDownload.getlastModifiedTime();
            lastFullyDownloadedPartNumber = persistableDownload.getLastFullyDownloadedPartNumber();
            lastFullyDownloadedFilePosition = persistableDownload.getLastFullyDownloadedFilePosition();
            lastEtagDuringPause = persistableDownload.getEtag();
        }

        return doDownload(getObjectRequest, file, stateListener, s3progressListener,
                          resumeExistingDownload, timeoutMillis, lastFullyDownloadedPartNumber,
                          lastModifiedTimeRecordedDuringPause, false, lastFullyDownloadedFilePosition,
                lastEtagDuringPause);
    }
Schedules a new transfer to download data from Amazon S3 and save it to
the specified file. This method is non-blocking and returns immediately
(i.e. before the data has been fully downloaded).
<p>
Use the returned Download object to query the progress of the transfer,
add listeners for progress events, and wait for the download to complete.
</p>
<p>
If you are downloading <a href="http://aws.amazon.com/kms/">Amazon Web Services
KMS</a>-encrypted objects, you need to specify the correct region of the
bucket on your client and configure Amazon Web Services Signature Version 4 for added
security. For more information on how to do this, see
http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#
specify-signature-version
</p>

@param getObjectRequest
           The request containing all the parameters for the download.
@param file
           The file to download the object data to.
@param progressListener
           An optional callback listener to get the progress of the
           download.
@param timeoutMillis
           Timeout, in milliseconds, for waiting for this download to
           complete.  Note that the timeout time will be approximate
           and is not strictly guaranteed.  As a result this timeout
           should not be relied on in cases where exact precision is
           required.
@param resumeOnRetry
           If set to true, upon an immediate retry of a failed object
           download, the <code>TransferManager</code> will resume the
           download from the current end of the file on disk.
@return A new <code>Download</code> object to use to check the state of
        the download, listen for progress notifications, and otherwise
        manage the download.

@throws AmazonClientException
            If any errors are encountered in the client while making the
            request or handling the response.
@throws AmazonServiceException
            If any errors occurred in Amazon S3 while processing the
            request.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/TransferManager.java