Class NestedJarHandler.RecyclableInflater
- java.lang.Object
-
- nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.RecyclableInflater
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,Resettable
- Enclosing class:
- NestedJarHandler
private static class NestedJarHandler.RecyclableInflater extends java.lang.Object implements Resettable, java.lang.AutoCloseable
Wrapper class that allows anInflater
instance to be reset for reuse and then recycled by aRecycler
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.zip.Inflater
inflater
Create a newInflater
instance with the "nowrap" option (which is needed for zipfile entries).
-
Constructor Summary
Constructors Modifier Constructor Description private
RecyclableInflater()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Called when theRecycler
instance is closed, to destroy theInflater
instance.java.util.zip.Inflater
getInflater()
Get theInflater
instance.void
reset()
Called when anInflater
instance is recycled, to reset the inflater so it can accept new input.
-
-
-
Method Detail
-
getInflater
public java.util.zip.Inflater getInflater()
Get theInflater
instance.- Returns:
- the
Inflater
instance.
-
reset
public void reset()
Called when anInflater
instance is recycled, to reset the inflater so it can accept new input.- Specified by:
reset
in interfaceResettable
-
close
public void close()
Called when theRecycler
instance is closed, to destroy theInflater
instance.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-