private void downloadInParallelUsingRange() throws Exception {
        createParentDirectoryIfNecessary(dstfile);

        if (!FileLocks.lock(dstfile)) {
            throw new FileLockException("Fail to lock " + dstfile);
        }

        long currentStart = startByte;
        long currentEnd = 0L;
        long filePositionToWrite = 0L;

        while (currentStart <= endByte) {
            // end is inclusive in setRange, so reduce size by 1
            currentEnd = currentStart + perRequestDownloadSize - 1;

            if (currentEnd > endByte) {
                currentEnd = endByte;
            }

            PresignedUrlDownloadRequest rangeRequest = request.clone();
            rangeRequest.setRange(currentStart, currentEnd);

            Callable<S3Object> s3Object = serviceCall(rangeRequest);
            futures.add(executor.submit(new DownloadS3ObjectCallable(s3Object,
                                                                     dstfile,
                                                                     filePositionToWrite)));

            filePositionToWrite += perRequestDownloadSize;
            currentStart = currentEnd + 1;
        }

        Future<File> future = executor.submit(completeAllFutures());

        ((DownloadMonitor) download.getMonitor()).setFuture(future);
    }
For presigned url downloads, we can only resume a download if start and end bytes can be determined
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/PresignUrlDownloadCallable.java