Class NestedJarHandler.RecyclableInflater

java.lang.Object
nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.RecyclableInflater
All Implemented Interfaces:
AutoCloseable, Resettable
Enclosing class:
NestedJarHandler

private static class NestedJarHandler.RecyclableInflater extends Object implements Resettable, AutoCloseable
Wrapper class that allows an Inflater instance to be reset for reuse and then recycled by a Recycler.
  • Field Details

    • inflater

      private final Inflater inflater
      Create a new Inflater instance with the "nowrap" option (which is needed for zipfile entries).
  • Constructor Details

    • RecyclableInflater

      private RecyclableInflater()
  • Method Details

    • getInflater

      public Inflater getInflater()
      Get the Inflater instance.
      Returns:
      the Inflater instance.
    • reset

      public void reset()
      Called when an Inflater instance is recycled, to reset the inflater so it can accept new input.
      Specified by:
      reset in interface Resettable
    • close

      public void close()
      Called when the Recycler instance is closed, to destroy the Inflater instance.
      Specified by:
      close in interface AutoCloseable