Reputation: 1035
I am uploading files to S3. When I do a GET, I get an S3Object as explained below -
S3Object s3object = s3Client.getObject(new GetObjectRequest(
bucketName, key));
I need to convert S3Object to java.io.File..
Is it that the following API is the only way I can do this -
S3ObjectInputStream getObjectContent()
Upvotes: 0
Views: 2783
Reputation: 4430
You could use the getObject(final GetObjectRequest getObjectRequest, File destinationFile) method to do what you want. It will write your object from Amazon S3 into the destinationFile you provide.
Upvotes: 2