Class DeflaterPool

    • Constructor Detail

      • DeflaterPool

        public DeflaterPool​(int capacity,
                            int compressionLevel,
                            boolean nowrap)
        Create a Pool of Deflater instances.

        If given a capacity equal to zero the Deflaters will not be pooled and will be created on acquire and ended on release. If given a negative capacity equal to zero there will be no size restrictions on the DeflaterPool

        Parameters:
        capacity - maximum number of Deflaters which can be contained in the pool
        compressionLevel - the default compression level for new Deflater objects
        nowrap - if true then use GZIP compatible compression for all new Deflater objects
    • Method Detail

      • newObject

        protected java.util.zip.Deflater newObject()
        Specified by:
        newObject in class CompressionPool<java.util.zip.Deflater>
      • end

        protected void end​(java.util.zip.Deflater deflater)
        Specified by:
        end in class CompressionPool<java.util.zip.Deflater>
      • reset

        protected void reset​(java.util.zip.Deflater deflater)
        Specified by:
        reset in class CompressionPool<java.util.zip.Deflater>