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

public Class HttpContentDecompressor

extends HttpContentDecoder
Class Inheritance
Static Imports
io.netty.handler.codec.http.HttpHeaderValues.BR, .HttpHeaderValues.DEFLATE, .HttpHeaderValues.GZIP, .HttpHeaderValues.X_DEFLATE, .HttpHeaderValues.X_GZIP, .HttpHeaderValues.SNAPPY

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.netty.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 EmbeddedChannel
newContentDecoder(String
the value of the "Content-Encoding" header
contentEncoding
)

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

Returns a new EmbeddedChannel that decodes the HTTP message content encoded in the specified contentEncoding.
Inherited from io.netty.handler.codec.http.HttpContentDecoder:
channelInactivechannelReadCompletedecodegetTargetContentEncodinghandlerAddedhandlerRemoved

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 EmbeddedChannel newContentDecoder(String contentEncoding) throws Exception

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

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

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

Parameters
contentEncoding:String

the value of the "Content-Encoding" header

Returns:EmbeddedChannel

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

Annotations
@Override