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
I would call getNextEntry() on the ZipInputStream until it is at the entry you want (use ZipEntry.getName() etc.). Calling getNextEntry() will advance the "cursor" to the beginning of the entry that it returns. Then, use ZipEntry.getSize() to determine how many bytes you should read using zipInputStream.read().