public Download resumeDownload ( PersistableDownload persistableDownload ) { assertParameterNotNull ( persistableDownload , "PausedDownload is mandatory to resume a download." ) ; GetObjectRequest request = new GetObjectRequest ( persistableDownload . getBucketName ( ) , persistableDownload . getKey ( ) , persistableDownload . getVersionId ( ) ) ; if ( persistableDownload . getRange ( ) != null && persistableDownload . getRange ( ) . length == 2 ) { long [ ] range = persistableDownload . getRange ( ) ; request . setRange ( range [ 0 ] , range [ 1 ] ) ; } request . setRequesterPays ( persistableDownload . isRequesterPays ( ) ) ; request . setResponseHeaders ( persistableDownload . getResponseHeaders ( ) ) ; return doDownload ( request , new File ( persistableDownload . getFile ( ) ) , null , null , APPEND_MODE , 0 , persistableDownload ) ; }
Resumes an download operation . This download operation uses the same configuration as the original download . Any data already fetched will be skipped and only the remaining data is retrieved from Amazon S3 .