I am trying to read a single file from a java.util.zip.ZipInputStream
, and copy it into a java.io.ByteArrayOutputStream
(so that I can then create a
Check if the input stream is positioned in the begging.
Otherwise, as implementation: I do not think that you need to write to the result stream while you are reading, unless you process this exact stream in another thread.
Just create a byte array, read the input stream, then create the output stream.