I am working with AWS Java api.
Retrieving file returns S3Object
that contains S3ObjectInputStream
which i read data from.
However, i would like to map S3ObjectInputStream
into normal InputStream
, is something like that possible?
I would love to create API that hides this implementation.
I know if i have small file i can just store bytes in array and create InputStream
from that, but big files will be needed too.
Thanks for help!
For S3 Java 1, refer to this example:
If you are using V2, see this client method. You can get a byte[] and then use that to meet your requirements:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.