@Override public ObjectMetadata getObject(final GetObjectRequest getObjectRequest, File destinationFile) throws SdkClientException, AmazonServiceException { rejectNull(destinationFile, "The destination file parameter must be specified when downloading an object directly to a file"); S3Object s3Object = ServiceUtils.retryableDownloadS3ObjectToFile(destinationFile, new ServiceUtils.RetryableS3DownloadTask() { @Override public S3Object getS3ObjectStream() { return getObject(getObjectRequest); } @Override public boolean needIntegrityCheck() { return !skipMd5CheckStrategy.skipClientSideValidationPerRequest(getObjectRequest); } }, ServiceUtils.OVERWRITE_MODE); // getObject can return null if constraints were specified but not met if (s3Object == null) return null; return s3Object.getObjectMetadata(); }
ServiceUtils.retryableDownloadS3ObjectToFile(File.createTempFile("temp1", "temp2"), task, false); ServiceUtils.retryableDownloadS3ObjectToFile(File.createTempFile("temp1", "temp2"), task, false); ServiceUtils.retryableDownloadS3ObjectToFile(File.createTempFile("temp1", "temp2"), task, false);
@Override public ObjectMetadata getObject(final GetObjectRequest getObjectRequest, File destinationFile) throws AmazonClientException, AmazonServiceException { assertParameterNotNull(destinationFile, "The destination file parameter must be specified when downloading an object directly to a file"); boolean mode = ServiceUtils.OVERWRITE_MODE; if (getObjectRequest.getRange() != null && getObjectRequest.getRange()[0] > 0) { mode = ServiceUtils.APPEND_MODE; } final S3Object s3Object = ServiceUtils.retryableDownloadS3ObjectToFile(destinationFile, new ServiceUtils.RetryableS3DownloadTask() { @Override public S3Object getS3ObjectStream() { return getObject(getObjectRequest); } @Override public boolean needIntegrityCheck() { return !ServiceUtils.skipMd5CheckPerRequest(getObjectRequest); } }, mode); // getObject can return null if constraints were specified but not met if (s3Object == null) { return null; } return s3Object.getObjectMetadata(); }
latch.await(); download.setState(TransferState.InProgress); final S3Object s3Object = ServiceUtils.retryableDownloadS3ObjectToFile(file, new ServiceUtils.RetryableS3DownloadTask() {
@Override public ObjectMetadata getObject(final GetObjectRequest getObjectRequest, File destinationFile) throws SdkClientException, AmazonServiceException { rejectNull(destinationFile, "The destination file parameter must be specified when downloading an object directly to a file"); S3Object s3Object = ServiceUtils.retryableDownloadS3ObjectToFile(destinationFile, new ServiceUtils.RetryableS3DownloadTask() { @Override public S3Object getS3ObjectStream() { return getObject(getObjectRequest); } @Override public boolean needIntegrityCheck() { return !skipMd5CheckStrategy.skipClientSideValidationPerRequest(getObjectRequest); } }, ServiceUtils.OVERWRITE_MODE); // getObject can return null if constraints were specified but not met if (s3Object == null) return null; return s3Object.getObjectMetadata(); }
@Override public ObjectMetadata getObject(final GetObjectRequest getObjectRequest, File destinationFile) throws AmazonClientException, AmazonServiceException { assertParameterNotNull(destinationFile, "The destination file parameter must be specified when downloading an object directly to a file"); boolean mode = ServiceUtils.OVERWRITE_MODE; if (getObjectRequest.getRange() != null && getObjectRequest.getRange()[0] > 0) { mode = ServiceUtils.APPEND_MODE; } final S3Object s3Object = ServiceUtils.retryableDownloadS3ObjectToFile(destinationFile, new ServiceUtils.RetryableS3DownloadTask() { @Override public S3Object getS3ObjectStream() { return getObject(getObjectRequest); } @Override public boolean needIntegrityCheck() { return !ServiceUtils.skipMd5CheckPerRequest(getObjectRequest); } }, mode); // getObject can return null if constraints were specified but not met if (s3Object == null) { return null; } return s3Object.getObjectMetadata(); }
latch.await(); download.setState(TransferState.InProgress); final S3Object s3Object = ServiceUtils.retryableDownloadS3ObjectToFile(file, new ServiceUtils.RetryableS3DownloadTask() {