Class 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleZipReader

        public SimpleZipReader()
    • 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: The SimpleZipReader 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