public class JdkZlibDecoder extends ZlibDecoder
ByteBuf 。
ByteToMessageDecoder.CumulatorChannelHandler.SharableCOMPOSITE_CUMULATOR, MERGE_CUMULATOR| Constructor and Description |
|---|
JdkZlibDecoder()
用默认包装器创建一个新实例(
ZlibWrapper.ZLIB )。
|
JdkZlibDecoder(boolean decompressConcatenated) |
JdkZlibDecoder(byte[] dictionary)
用指定的预设字典创建一个新实例。
|
JdkZlibDecoder(ZlibWrapper wrapper)
用指定的包装器创建一个新的实例。
|
JdkZlibDecoder(ZlibWrapper wrapper, boolean decompressConcatenated) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out)
解码从一个 ByteBuf到另一个。
|
protected void |
handlerRemoved0(ChannelHandlerContext ctx)
在 ByteToMessageDecoder从实际上下文中移除之后调用,它不再处理事件。
|
boolean |
isClosed()
当且仅当已达到压缩流的结束时才返回
true 。
|
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAddedpublic JdkZlibDecoder()
ZlibWrapper.ZLIB )。
public JdkZlibDecoder(byte[] dictionary)
ZlibWrapper.ZLIB,因为它是唯一支持预设字典的格式。
public JdkZlibDecoder(ZlibWrapper wrapper)
ZlibWrapper.GZIP , ZlibWrapper.ZLIB和ZlibWrapper.NONE有ATM支持。
public JdkZlibDecoder(ZlibWrapper wrapper, boolean decompressConcatenated)
public JdkZlibDecoder(boolean decompressConcatenated)
public boolean isClosed()
ZlibDecoder
true 。
isClosed在课堂
ZlibDecoder
protected void decode(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out) throws java.lang.Exception
ByteToMessageDecoder
decode在课堂上
ByteToMessageDecoder
ctx - 这ByteToMessageDecoder所属的ChannelHandlerContext
in - 从中读取数据的ByteBuf
out - 应该添加解码消息的
List
java.lang.Exception - 发生错误时抛出
protected void handlerRemoved0(ChannelHandlerContext ctx) throws java.lang.Exception
ByteToMessageDecoder
ByteToMessageDecoder已从实际上下文中删除之后调用,它不再处理事件。
handlerRemoved0在类
ByteToMessageDecoder
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.