Interface IGenericZipBrowser

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
IGenericJarBrowser
All Known Implementing Classes:
JarBrowser, JarBrowserApache, JarBrowserOracle, ZipBrowser, ZipBrowserApache, ZipBrowserOracle, ZipBrowserPNF

public interface IGenericZipBrowser extends AutoCloseable
Generic interface for Zip readers.
  • Method Details

    • close

      void close() throws IOException
      Close the archive browser and release its backing resources.
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException - if closing failed
    • getEntries

      Map<String,GenericZipEntry<?>> getEntries()
      Get the archive entries indexed by entry name.
      Returns:
      entry map
    • getEntry

      GenericZipEntry<?> getEntry(String name)
      Get an archive entry by name.
      Parameters:
      name - entry name
      Returns:
      entry descriptor, or null
    • readEntry

      byte[] readEntry(String name) throws IOException
      Read and decompress an archive entry.
      Parameters:
      name - entry name
      Returns:
      decompressed entry bytes
      Throws:
      IOException - if the entry cannot be read
    • getEntryStream

      InputStream getEntryStream(String name) throws IOException
      Open a stream for an archive entry.
      Parameters:
      name - entry name
      Returns:
      stream yielding decompressed entry bytes
      Throws:
      IOException - if the entry cannot be opened