Class ZlibEncoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- io.netty.handler.codec.MessageToByteEncoder<ByteBuf>
-
- io.netty.handler.codec.compression.ZlibEncoder
-
- All Implemented Interfaces:
ChannelHandler
,ChannelOutboundHandler
- Direct Known Subclasses:
JdkZlibEncoder
,JZlibEncoder
public abstract class ZlibEncoder extends MessageToByteEncoder<ByteBuf>
Compresses aByteBuf
using the deflate algorithm.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ZlibEncoder()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract ChannelFuture
close()
Close thisZlibEncoder
and so finish the encoding.abstract ChannelFuture
close(ChannelPromise promise)
Close thisZlibEncoder
and so finish the encoding.abstract boolean
isClosed()
Returnstrue
if and only if the end of the compressed stream has been reached.-
Methods inherited from class io.netty.handler.codec.MessageToByteEncoder
acceptOutboundMessage, allocateBuffer, encode, isPreferDirect, write
-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.ChannelHandler
exceptionCaught, handlerAdded, handlerRemoved
-
-
-
-
Method Detail
-
isClosed
public abstract boolean isClosed()
Returnstrue
if and only if the end of the compressed stream has been reached.
-
close
public abstract ChannelFuture close()
Close thisZlibEncoder
and so finish the encoding. The returnedChannelFuture
will be notified once the operation completes.
-
close
public abstract ChannelFuture close(ChannelPromise promise)
Close thisZlibEncoder
and so finish the encoding. The givenChannelFuture
will be notified once the operation completes and will also be returned.
-
-