Class HttpContentDecompressor

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.MessageToMessageDecoder<HttpObject>
io.netty.handler.codec.http.HttpContentDecoder
io.netty.handler.codec.http.HttpContentDecompressor
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class HttpContentDecompressor extends HttpContentDecoder
Decompresses an HttpMessage and an HttpContent compressed in gzip or deflate encoding. For more information on how this handler modifies the message, please refer to HttpContentDecoder.
  • Constructor Details

    • HttpContentDecompressor

      public HttpContentDecompressor()
      Create a new HttpContentDecompressor in non-strict mode.
    • HttpContentDecompressor

      public HttpContentDecompressor(boolean strict)
      Parameters:
      strict - if true use strict handling of deflate if used, otherwise handle it in a more lenient fashion.
  • Method Details

    • newContentDecoder

      protected io.netty.channel.embedded.EmbeddedChannel newContentDecoder(String contentEncoding) throws 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:
      Exception