Package io.activej.csp.binary
Interface ByteBufsCodec<I,O>
public interface ByteBufsCodec<I,O>
-
Method Summary
Modifier and TypeMethodDescriptiondefault <I1,O1> @NotNull ByteBufsCodec<I1, O1> andThen(DecoderFunction<? super I, ? extends I1> decoder, Function<? super O1, ? extends O> encoder) io.activej.bytebuf.ByteBufstatic @NotNull ByteBufsCodec<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf> ofDelimiter(ByteBufsDecoder<io.activej.bytebuf.ByteBuf> delimiterIn, UnaryOperator<io.activej.bytebuf.ByteBuf> delimiterOut) tryDecode(io.activej.bytebuf.ByteBufs bufs)
-
Method Details
-
encode
-
tryDecode
@Nullable I tryDecode(io.activej.bytebuf.ByteBufs bufs) throws io.activej.common.exception.MalformedDataException - Throws:
io.activej.common.exception.MalformedDataException
-
andThen
@NotNull default <I1,O1> @NotNull ByteBufsCodec<I1,O1> andThen(DecoderFunction<? super I, ? extends I1> decoder, Function<? super O1, ? extends O> encoder) -
ofDelimiter
@NotNull static @NotNull ByteBufsCodec<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf> ofDelimiter(ByteBufsDecoder<io.activej.bytebuf.ByteBuf> delimiterIn, UnaryOperator<io.activej.bytebuf.ByteBuf> delimiterOut)
-