Class ZipFileZipEntrySource

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ZipEntrySource

    public class ZipFileZipEntrySource
    extends java.lang.Object
    implements ZipEntrySource
    A ZipEntrySource wrapper around a ZipFile. Should be as low in terms of memory as a normal ZipFile implementation is.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Indicates we are done with reading, and resources may be freed
      java.util.Enumeration<? extends ZipArchiveEntry> getEntries()
      Returns an Enumeration of all the Entries
      ZipArchiveEntry getEntry​(java.lang.String path)
      Return an entry by its path
      java.io.InputStream getInputStream​(ZipArchiveEntry entry)
      Returns an InputStream of the decompressed data that makes up the entry
      boolean isClosed()
      Has close been called already?
      • Methods inherited from class java.lang.Object

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

      • ZipFileZipEntrySource

        public ZipFileZipEntrySource​(ZipFile zipFile)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: ZipEntrySource
        Indicates we are done with reading, and resources may be freed
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface ZipEntrySource
        Throws:
        java.io.IOException
      • getInputStream

        public java.io.InputStream getInputStream​(ZipArchiveEntry entry)
                                           throws java.io.IOException
        Description copied from interface: ZipEntrySource
        Returns an InputStream of the decompressed data that makes up the entry
        Specified by:
        getInputStream in interface ZipEntrySource
        Throws:
        java.io.IOException
      • getEntry

        public ZipArchiveEntry getEntry​(java.lang.String path)
        Description copied from interface: ZipEntrySource
        Return an entry by its path
        Specified by:
        getEntry in interface ZipEntrySource
        Parameters:
        path - the path in unix-notation
        Returns:
        the entry or null if not found