Interface BlockEncoder


public interface BlockEncoder
Defines methods to encode incoming data into Data Blocks
  • Method Summary

    Modifier and Type
    Method
    Description
    io.activej.bytebuf.ByteBuf
    encode(io.activej.bytebuf.ByteBuf inputBuf)
    Encodes input ByteBuf as a Data Block.
    io.activej.bytebuf.ByteBuf
    Encodes an End-Of-Stream Block which indicates an end of stream.
    void
    Attempts to reset some internal state of encoder.
  • Method Details

    • encode

      io.activej.bytebuf.ByteBuf encode(io.activej.bytebuf.ByteBuf inputBuf)
      Encodes input ByteBuf as a Data Block. Input bufs are not empty. If it is the first bytebuf, encoder may encode Stream Header together with Data Block.
      Parameters:
      inputBuf - buf to be encoded
      Returns:
      ByteBuf that contains encoded data
    • reset

      void reset()
      Attempts to reset some internal state of encoder. This method is called before each call to encode(ByteBuf) (if ChannelFrameEncoder is configured to do so).
    • encodeEndOfStreamBlock

      io.activej.bytebuf.ByteBuf encodeEndOfStreamBlock()
      Encodes an End-Of-Stream Block which indicates an end of stream.
      Returns:
      ByteBuf which contains End-Of-Stream block