Class InflaterCache


  • public class InflaterCache
    extends java.lang.Object
    Creates zlib based inflaters as necessary for object decompression.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.zip.Inflater get()
      Obtain an Inflater for decompression.
      static void release​(java.util.zip.Inflater i)
      Release an inflater previously obtained from this cache.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
      • 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.