Class GzipCompressor

  • All Implemented Interfaces:
    Compressor

    public final class GzipCompressor
    extends java.lang.Object
    implements Compressor
    Gzip Compressor.

    This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private GzipCompressor()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.OutputStream compress​(java.io.OutputStream outputStream)
      Wrap the outputStream with a compressing output stream.
      java.lang.String getEncoding()
      The name of the compressor encoding.
      static GzipCompressor getInstance()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GzipCompressor

        private GzipCompressor()
    • Method Detail

      • getEncoding

        public java.lang.String getEncoding()
        Description copied from interface: Compressor
        The name of the compressor encoding.

        Used to identify the compressor during configuration and to populate the Content-Encoding header.

        Specified by:
        getEncoding in interface Compressor
      • compress

        public java.io.OutputStream compress​(java.io.OutputStream outputStream)
                                      throws java.io.IOException
        Description copied from interface: Compressor
        Wrap the outputStream with a compressing output stream.
        Specified by:
        compress in interface Compressor
        Throws:
        java.io.IOException