Class OfDelimiter

java.lang.Object
io.activej.csp.binary.codec.impl.OfDelimiter
All Implemented Interfaces:
ByteBufsCodec<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>

public final class OfDelimiter extends Object implements ByteBufsCodec<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>
  • Field Details

    • delimiterOut

      public final UnaryOperator<io.activej.bytebuf.ByteBuf> delimiterOut
    • delimiterIn

      public final ByteBufsDecoder<io.activej.bytebuf.ByteBuf> delimiterIn
  • Constructor Details

    • OfDelimiter

      public OfDelimiter(UnaryOperator<io.activej.bytebuf.ByteBuf> delimiterOut, ByteBufsDecoder<io.activej.bytebuf.ByteBuf> delimiterIn)
  • Method Details

    • encode

      public io.activej.bytebuf.ByteBuf encode(io.activej.bytebuf.ByteBuf buf)
      Specified by:
      encode in interface ByteBufsCodec<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>
    • tryDecode

      @Nullable public @Nullable io.activej.bytebuf.ByteBuf tryDecode(io.activej.bytebuf.ByteBufs bufs) throws io.activej.common.exception.MalformedDataException
      Specified by:
      tryDecode in interface ByteBufsCodec<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>
      Throws:
      io.activej.common.exception.MalformedDataException