private void adjustRequest(PresignedUrlDownloadRequest request) {
        long start = -1;
        long end = -1;

        if (request.getRange() != null) {
            long[] range = request.getRange();
            start = range[0];
            end = range[1];
        } else {
            start = startByte.longValue();
            end = endByte.longValue();
        }

        if (dstfile.exists()) {
            if (!FileLocks.lock(dstfile)) {
                throw new FileLockException("Fail to lock " + dstfile + " for range adjustment");
            }
            try {
                expectedFileLength = dstfile.length();
                long newStart = start + expectedFileLength;
                LOG.debug("Adjusting request range from " +  Arrays.toString(new long[] {start, end})
                         + " to " + Arrays.toString(new long[] {newStart, end})
                         + " for file " + dstfile);
                request.setRange(newStart, end);

                long totalBytesToDownload  = end - newStart + 1;
                if (totalBytesToDownload < 0) {
                    throw new IllegalArgumentException(
                        "Unable to determine the range for download operation. lastByte=" + end
                        + ", StartingByte=" + newStart
                        + ", expectedFileLength=" + expectedFileLength
                        + ", totalBytesToDownload=" + totalBytesToDownload);
                }
            } finally {
                FileLocks.unlock(dstfile);
            }
        }
    }
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