Class HttpContentDecompressor
- java.lang.Object
-
- org.jboss.netty.channel.SimpleChannelUpstreamHandler
-
- org.jboss.netty.handler.codec.http.HttpContentDecoder
-
- org.jboss.netty.handler.codec.http.HttpContentDecompressor
-
- All Implemented Interfaces:
ChannelHandler
,ChannelUpstreamHandler
,LifeCycleAwareChannelHandler
public class HttpContentDecompressor extends HttpContentDecoder
Decompresses anHttpMessage
and anHttpChunk
compressed ingzip
ordeflate
encoding. For more information on how this handler modifies the message, please refer toHttpContentDecoder
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description HttpContentDecompressor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DecoderEmbedder<ChannelBuffer>
newContentDecoder(String contentEncoding)
Returns a newDecoderEmbedder
that decodes the HTTP message content encoded in the specified contentEncoding.-
Methods inherited from class org.jboss.netty.handler.codec.http.HttpContentDecoder
afterAdd, afterRemove, beforeAdd, beforeRemove, channelClosed, getTargetContentEncoding, messageReceived
-
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler
channelBound, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, exceptionCaught, handleUpstream, writeComplete
-
-
-
-
Method Detail
-
newContentDecoder
protected DecoderEmbedder<ChannelBuffer> newContentDecoder(String contentEncoding) throws Exception
Description copied from class:HttpContentDecoder
Returns a newDecoderEmbedder
that decodes the HTTP message content encoded in the specified contentEncoding.- Specified by:
newContentDecoder
in classHttpContentDecoder
- Parameters:
contentEncoding
- the value of the"Content-Encoding"
header- Returns:
- a new
DecoderEmbedder
if the specified encoding is supported.null
otherwise (alternatively, you can throw an exception to block unknown encoding). - Throws:
Exception
-
-