How to read an InputStream

442 views
Skip to first unread message

Joao_Salcedo

unread,
Jun 13, 2012, 3:10:40 AM6/13/12
to clo...@googlegroups.com
HI all,

I am trying to read a InputStream that is coming from S3
I am using clj-aws-s3 library

When I get the object I get a #<S3ObjectInputStream com.amazonaws.services.s3.model.S3ObjectInputStream@40d88d2d>
How can I get the content inside this InputStream, any ideas, unfortunately I do not know how?

Any example code would be great.

Cheers
JS

Baishampayan Ghose

unread,
Jun 13, 2012, 3:14:08 AM6/13/12
to clo...@googlegroups.com
> I am trying to read a InputStream that is coming from S3
> I am using clj-aws-s3 library
>
> When I get the object I get a #<S3ObjectInputStream
> com.amazonaws.services.s3.model.S3ObjectInputStream@40d88d2d>
> How can I get the content inside this InputStream, any ideas, unfortunately
> I do not know how?

Take a look at clojure.java.io

There is a `reader` function which will convert an InputStream to a
Reader. There is also copy, etc.

More here http://clojuredocs.org/clojure_core/clojure.java.io

Regards,
BG

--
Baishampayan Ghose
b.ghose at gmail.com
Reply all
Reply to author
Forward
0 new messages