Class HttpContentDecompressor

    • Constructor Detail

      • HttpContentDecompressor

        public HttpContentDecompressor​(int maxAllocation)
        Create a new HttpContentDecompressor in non-strict mode.
        Parameters:
        maxAllocation - Maximum size of the decompression buffer. Must be >= 0. If zero, maximum size is not limited.
      • HttpContentDecompressor

        public HttpContentDecompressor​(boolean strict,
                                       int maxAllocation)
        Parameters:
        strict - if true use strict handling of deflate if used, otherwise handle it in a more lenient fashion.
        maxAllocation - Maximum size of the decompression buffer. Must be >= 0. If zero, maximum size is not limited.
    • Method Detail

      • newContentDecoder

        protected EmbeddedChannel newContentDecoder​(java.lang.String contentEncoding)
                                             throws java.lang.Exception
        Description copied from class: HttpContentDecoder
        Returns a new EmbeddedChannel that decodes the HTTP message content encoded in the specified contentEncoding.
        Specified by:
        newContentDecoder in class HttpContentDecoder
        Parameters:
        contentEncoding - the value of the "Content-Encoding" header
        Returns:
        a new EmbeddedChannel if the specified encoding is supported. null otherwise (alternatively, you can throw an exception to block unknown encoding).
        Throws:
        java.lang.Exception