Class GzipHttpOutputInterceptor

    • Field Detail

      • LOG

        public static Logger LOG
      • GZIP_HEADER

        private static final byte[] GZIP_HEADER
      • VARY_ACCEPT_ENCODING_USER_AGENT

        public static final HttpField VARY_ACCEPT_ENCODING_USER_AGENT
      • VARY_ACCEPT_ENCODING

        public static final HttpField VARY_ACCEPT_ENCODING
      • _crc

        private final java.util.zip.CRC32 _crc
      • _bufferSize

        private final int _bufferSize
      • _syncFlush

        private final boolean _syncFlush
      • _deflater

        private java.util.zip.Deflater _deflater
      • _buffer

        private java.nio.ByteBuffer _buffer
    • Method Detail

      • write

        public void write​(java.nio.ByteBuffer content,
                          boolean complete,
                          Callback callback)
        Description copied from interface: HttpOutput.Interceptor
        Write content. The response is committed by the first call to write and is closed by a call with last == true. Empty content buffers may be passed to force a commit or close.
        Specified by:
        write in interface HttpOutput.Interceptor
        Parameters:
        content - The content to be written or an empty buffer.
        complete - True if this is the last call to write
        callback - The callback to use to indicate Callback.succeeded() or Callback.failed(Throwable).
      • addTrailer

        private void addTrailer()
      • gzip

        private void gzip​(java.nio.ByteBuffer content,
                          boolean complete,
                          Callback callback)
      • commit

        protected void commit​(java.nio.ByteBuffer content,
                              boolean complete,
                              Callback callback)
      • etagGzip

        private java.lang.String etagGzip​(java.lang.String etag)
      • noCompression

        public void noCompression()
      • noCompressionIfPossible

        public void noCompressionIfPossible()
      • mightCompress

        public boolean mightCompress()