Write a stream into a file with NIO and the Channel system

Posted by Maxime ARNSTAMM on Stack Overflow See other posts from Stack Overflow or by Maxime ARNSTAMM
Published on 2010-05-20T12:31:07Z Indexed on 2010/05/20 12:40 UTC
Read the original article Hit count: 283

Filed under:
|

Hi

I have an inputStream and i want to write it to a file.

I saw NIO and the FileChannel which has the method "transferTo" ou "transferFrom" and i know how to create the WriteableChannel, but i don't know to transform my inputStream to a ReadableChannel.

Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about nio