Class ZlibEncoder

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelOutboundHandler
    Direct Known Subclasses:
    JdkZlibEncoder, JZlibEncoder

    public abstract class ZlibEncoder
    extends io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>
    Compresses a ByteBuf using the deflate algorithm.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ZlibEncoder()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract io.netty.channel.ChannelFuture close()
      Close this ZlibEncoder and so finish the encoding.
      abstract io.netty.channel.ChannelFuture close​(io.netty.channel.ChannelPromise promise)
      Close this ZlibEncoder and so finish the encoding.
      abstract boolean isClosed()
      Returns true 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 interface io.netty.channel.ChannelHandler

        exceptionCaught, handlerAdded, handlerRemoved
    • Constructor Detail

      • ZlibEncoder

        protected ZlibEncoder()
    • Method Detail

      • isClosed

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

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

        public abstract io.netty.channel.ChannelFuture close​(io.netty.channel.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.