public void abortMultipartUploads(String bucketName, Date date)
            throws AmazonServiceException, AmazonClientException {
        assertNotObjectLambdaArn(bucketName, "abortMultipartUploads");

        MultipartUploadListing uploadListing = s3.listMultipartUploads(appendSingleObjectUserAgent(
                new ListMultipartUploadsRequest(bucketName)));
        do {
            for (MultipartUpload upload : uploadListing.getMultipartUploads()) {
                if (upload.getInitiated().compareTo(date) < 0) {
                    s3.abortMultipartUpload(appendSingleObjectUserAgent(new AbortMultipartUploadRequest(
                            bucketName, upload.getKey(), upload.getUploadId())));
                }
            }

            ListMultipartUploadsRequest request = new ListMultipartUploadsRequest(bucketName)
                .withUploadIdMarker(uploadListing.getNextUploadIdMarker())
                .withKeyMarker(uploadListing.getNextKeyMarker());
            uploadListing = s3.listMultipartUploads(appendSingleObjectUserAgent(request));
        } while (uploadListing.isTruncated());
    }
<p>
Aborts any multipart uploads that were initiated before the specified date.
</p>
<p>
This method is useful for cleaning up any interrupted multipart uploads.
<code>TransferManager</code> attempts to abort any failed uploads,
but in some cases this may not be possible, such as if network connectivity
is completely lost.
</p>

@param bucketName
           The name of the bucket containing the multipart uploads to
           abort.
@param date
           The date indicating which multipart uploads should be aborted.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/TransferManager.java