Class ZlibEncoder

All Implemented Interfaces:
ChannelHandler, ChannelOutboundHandler
Direct Known Subclasses:
JdkZlibEncoder, JZlibEncoder

public abstract class ZlibEncoder extends MessageToByteEncoder<ByteBuf>
Compresses a ByteBuf using the deflate algorithm.
  • Constructor Details

    • ZlibEncoder

      protected ZlibEncoder()
  • Method Details

    • isClosed

      public abstract boolean isClosed()
      Returns true if and only if the end of the compressed stream has been reached.
    • close

      public abstract ChannelFuture close()
      Close this ZlibEncoder and so finish the encoding. The returned ChannelFuture will be notified once the operation completes.
    • close

      public abstract ChannelFuture close(ChannelPromise promise)
      Close this ZlibEncoder and so finish the encoding. The given ChannelFuture will be notified once the operation completes and will also be returned.