Package org.eclipse.jgit.lib
Class InflaterCache
- java.lang.Object
-
- org.eclipse.jgit.lib.InflaterCache
-
public class InflaterCache extends java.lang.ObjectCreates zlib based inflaters as necessary for object decompression.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.zip.Inflater[]inflaterCacheprivate static intopenInflaterCountprivate static intSZ
-
Constructor Summary
Constructors Modifier Constructor Description privateInflaterCache()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.zip.Inflaterget()Obtain an Inflater for decompression.private static java.util.zip.InflatergetImpl()static voidrelease(java.util.zip.Inflater i)Release an inflater previously obtained from this cache.private static booleanreleaseImpl(java.util.zip.Inflater i)
-
-
-
Field Detail
-
SZ
private static final int SZ
- See Also:
- Constant Field Values
-
inflaterCache
private static final java.util.zip.Inflater[] inflaterCache
-
openInflaterCount
private static int openInflaterCount
-
-
Method Detail
-
get
public static java.util.zip.Inflater get()
Obtain an Inflater for decompression.Inflaters obtained through this cache should be returned (if possible) by
release(Inflater)to avoid garbage collection and reallocation.- Returns:
- an available inflater. Never null.
-
getImpl
private static java.util.zip.Inflater getImpl()
-
release
public static void release(java.util.zip.Inflater i)
Release an inflater previously obtained from this cache.- Parameters:
i- the inflater to return. May be null, in which case this method does nothing.
-
releaseImpl
private static boolean releaseImpl(java.util.zip.Inflater i)
-
-