code: private void copyInParts() throws Exception {
          multipartUploadId = initiateMultipartUpload(copyObjectRequest);
  
          long optimalPartSize = getOptimalPartSize(metadata.getContentLength());
  
          try {
              CopyPartRequestFactory requestFactory = new CopyPartRequestFactory(
                      copyObjectRequest, multipartUploadId, optimalPartSize,
                      metadata.getContentLength());
              copyPartsInParallel(requestFactory);
          } catch (Exception e) {
              publishProgress(listenerChain, ProgressEventType.TRANSFER_FAILED_EVENT);
              abortMultipartCopy();
              throw new RuntimeException("Unable to perform multipart copy", e);
          }
      }
docs: Performs the copy of an Amazon S3 object from source bucket to
  destination bucket as multiple copy part requests. The information about
  the part to be copied is specified in the request as a byte range
  (first-last)
  
  @throws Exception
  Any Exception that occurs while carrying out the request.