Package writer2latex.util
Class SimpleZipReader
- java.lang.Object
-
- writer2latex.util.SimpleZipReader
-
public class SimpleZipReader extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SimpleZipReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getEntry(java.lang.String sName)
Get an entry from the ZIP file.void
read(java.io.InputStream is)
Read a zipped stream
-
-
-
Method Detail
-
read
public void read(java.io.InputStream is) throws java.io.IOException
Read a zipped stream- Parameters:
is
-InputStream
to read- Throws:
java.io.IOException
- if an I/O error occurs
-
getEntry
public byte[] getEntry(java.lang.String sName)
Get an entry from the ZIP file. Getting should be taken quite literally here: You can only get an entry once: TheSimpleZipReader
removes the entry from the collection when this method is called (memory optimization).- Parameters:
sName
- the name (path) of the ZIP entry- Returns:
- a byte array with the contents of the entry, or null if the entry does not exist
-
-