Top Description Fields Constructors Methods
io.netty5.handler.codec.http

public Class HttpContentDecompressor

extends HttpContentDecoder
Class Inheritance
Imports
io.netty5.handler.codec.compression.Brotli, .BrotliDecompressor, .Decompressor, .ZlibDecompressor, .ZlibWrapper

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.

Field Summary

Modifier and TypeField and Description
private final boolean
Inherited from io.netty5.handler.codec.http.HttpContentDecoder:
ctxIDENTITY

Constructor Summary

AccessConstructor and Description
public
HttpContentDecompressor()

Create a new HttpContentDecompressor in non-strict mode.

public
HttpContentDecompressor(boolean
if true use strict handling of deflate if used, otherwise handle it in a more lenient fashion.
strict
)

Create a new HttpContentDecompressor.

Method Summary

Modifier and TypeMethod and Description
protected Decompressor
newContentDecoder(CharSequence
the value of the "Content-Encoding" header
contentEncoding
)

Implements abstract io.netty5.handler.codec.http.HttpContentDecoder.newContentDecoder.

Returns a new Decompressor that decodes the HTTP message content encoded in the specified contentEncoding.
Inherited from io.netty5.handler.codec.http.HttpContentDecoder:
channelInactivechannelReadCompletedecodeAndClosegetTargetContentEncodinghandlerAddedhandlerRemoved

Field Detail

strictback to summary
private final boolean strict

Constructor Detail

HttpContentDecompressorback to summary
public HttpContentDecompressor()

Create a new HttpContentDecompressor in non-strict mode.

HttpContentDecompressorback to summary
public HttpContentDecompressor(boolean strict)

Create a new HttpContentDecompressor.

Parameters
strict:boolean

if true use strict handling of deflate if used, otherwise handle it in a more lenient fashion.

Method Detail

newContentDecoderback to summary
protected Decompressor newContentDecoder(CharSequence contentEncoding) throws Exception

Implements abstract io.netty5.handler.codec.http.HttpContentDecoder.newContentDecoder.

Doc from io.netty5.handler.codec.http.HttpContentDecoder.newContentDecoder.

Returns a new Decompressor that decodes the HTTP message content encoded in the specified contentEncoding.

Parameters
contentEncoding:CharSequence

the value of the "Content-Encoding" header

Returns:Decompressor

a new Decompressor if the specified encoding is supported. null otherwise (alternatively, you can throw an exception to block unknown encoding).

Annotations
@Override