Under AWS JAVA SDK, I can see AmazonS3.java, TransferManager.java for copying/transferring files between two S3 buckets. I want to know what can be used when the destination is NOT a S3 bucket. I have a requirement where I need to transfer from S3 bucket to SharePoint but under AWS Java SDK I can't find any utility to copy/move files from S3 bucket to any destination other than another bucket. Please help.
The general solution is to use S3Client.getObject(objectRequest)
which is a ResponseInputStream<GetObjectResponse>
. This AWS specific object is subclass of the standard java.io.InputStream
.
So all you need to do is read that stream...
byte[]
to your Sharepoint clientThe actual byte moving could be assisted with a tool such as Apache Commons IO: IOUtils