public class ZlibDecoder extends OneToOneDecoder
ChannelBuffer
using the deflate algorithm.ChannelHandler.Sharable
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
decode(ChannelHandlerContext ctx,
Channel channel,
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 Object decode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception
OneToOneDecoder
null
if the received message
is supposed to be discarded.decode
in class OneToOneDecoder
Exception
Copyright © 2008-2016 The Netty Project. All Rights Reserved.