public class HttpContentDecompressor extends HttpContentDecoder
HttpMessage和HttpContent中压缩gzip或deflate编码。
有关此处理程序如何修改消息的更多信息,请参阅HttpContentDecoder 。
ChannelHandler.Sharablectx| Constructor and Description |
|---|
HttpContentDecompressor()
以非严格模式创建新的 HttpContentDecompressor 。
|
HttpContentDecompressor(boolean strict)
创建一个新的 HttpContentDecompressor 。
|
| Modifier and Type | Method and Description |
|---|---|
protected EmbeddedChannel |
newContentDecoder(java.lang.String contentEncoding)
返回一个新的 EmbeddedChannel ,它解码在指定的contentEncoding中编码的HTTP消息内容。
|
channelInactive, decode, getTargetContentEncoding, handlerAdded, handlerRemovedacceptInboundMessage, channelReadchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, isSharablepublic HttpContentDecompressor()
HttpContentDecompressor 。
public HttpContentDecompressor(boolean strict)
HttpContentDecompressor 。
strict - 如果
true使用严格的deflate处理,否则以更宽松的方式处理。
protected EmbeddedChannel newContentDecoder(java.lang.String contentEncoding) throws java.lang.Exception
HttpContentDecoder
EmbeddedChannel ,它解码在指定的contentEncoding中编码的HTTP消息内容。
newContentDecoder在课堂上
HttpContentDecoder
contentEncoding -
"Content-Encoding"标题的值
EmbeddedChannel如果支持指定的编码。
否则null (或者,您可以抛出异常来阻止未知编码)。
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.