public class HttpContentDecompressor extends HttpContentDecoder
HttpMessage
and an HttpContent
compressed in
gzip
or deflate
encoding. For more information on how this
handler modifies the message, please refer to HttpContentDecoder
.ChannelHandler.Sharable
ctx
构造器和说明 |
---|
HttpContentDecompressor()
Create a new
HttpContentDecompressor in non-strict mode. |
HttpContentDecompressor(boolean strict)
Create a new
HttpContentDecompressor . |
限定符和类型 | 方法和说明 |
---|---|
protected EmbeddedChannel |
newContentDecoder(java.lang.String contentEncoding)
Returns a new
EmbeddedChannel that decodes the HTTP message
content encoded in the specified contentEncoding. |
channelInactive, channelReadComplete, decode, getTargetContentEncoding, handlerAdded, handlerRemoved
acceptInboundMessage, channelRead
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, isSharable
public HttpContentDecompressor()
HttpContentDecompressor
in non-strict mode.public HttpContentDecompressor(boolean strict)
HttpContentDecompressor
.strict
- if true
use strict handling of deflate if used, otherwise handle it in a
more lenient fashion.protected EmbeddedChannel newContentDecoder(java.lang.String contentEncoding) throws java.lang.Exception
HttpContentDecoder
EmbeddedChannel
that decodes the HTTP message
content encoded in the specified contentEncoding.newContentDecoder
在类中 HttpContentDecoder
contentEncoding
- the value of the "Content-Encoding"
headerEmbeddedChannel
if the specified encoding is supported.
null
otherwise (alternatively, you can throw an exception
to block unknown encoding).java.lang.Exception