public class ZlibDecoder extends OneToOneDecoder
ChannelBuffer
using the deflate algorithm.ChannelHandler.Sharable
构造器和说明 |
---|
ZlibDecoder()
Creates a new instance with the default wrapper (
ZlibWrapper.ZLIB ). |
ZlibDecoder(byte[] dictionary)
Creates a new instance with the specified preset dictionary.
|
ZlibDecoder(ZlibWrapper wrapper)
Creates a new instance with the specified wrapper.
|
限定符和类型 | 方法和说明 |
---|---|
protected java.lang.Object |
decode(ChannelHandlerContext ctx,
Channel channel,
java.lang.Object msg)
Transforms the specified received message into another message and return
the transformed message.
|
boolean |
isClosed()
Returns
true if and only if the end of the compressed stream
has been reached. |
handleUpstream
public ZlibDecoder()
ZlibWrapper.ZLIB
).CompressionException
- if failed to initialize zlibpublic ZlibDecoder(ZlibWrapper wrapper)
CompressionException
- if failed to initialize zlibpublic ZlibDecoder(byte[] dictionary)
ZlibWrapper.ZLIB
because it is the only format that
supports the preset dictionary.CompressionException
- if failed to initialize zlibpublic boolean isClosed()
true
if and only if the end of the compressed stream
has been reached.protected java.lang.Object decode(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg) throws java.lang.Exception
OneToOneDecoder
null
if the received message
is supposed to be discarded.decode
在类中 OneToOneDecoder
java.lang.Exception