Skip to content
Advertisement

Tag: io

Most efficient way to create InputStream from OutputStream

This page: http://blog.ostermiller.org/convert-java-outputstream-inputstream describes how to create an InputStream from OutputStream: Other alternatives are to use PipedStreams and new threads which is cumbersome. I do not like the idea of copying many megabytes to new in memory byte array. Is there a library that does this more efficiently? EDIT: By advice from Laurence Gonsalves, i tried PipedStreams and it turned

Advertisement