getInputStream for a ZipEntry from ZipInputStream (without using the ZipFile class)

Mohammad Hassany picture Mohammad Hassany · Jan 30, 2013 · Viewed 31k times · Source

How can I get an InputStream for a ZipEntry from a ZipInputStream without using the ZipFile class?

Answer

user207421 picture user207421 · Jan 30, 2013

Err, the ZipInputStream already is an InputStream. You don't need another one. Getting the next ZipEntry positions the stream at the beginning of the entry. See the Javadoc.