Package io.activej.csp.binary
Interface ByteBufsDecoder<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <V> ByteBufsDecoder<V>andThen(DecoderFunction<? super T, ? extends V> after) static ByteBufsDecoder<byte[]>assertBytes(byte[] data) static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>ofByteSizePrefixedBytes(int maxSize) static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>ofCrlfTerminatedBytes(int maxSize) static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>ofCrTerminatedBytes(int maxSize) static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>ofFixedSize(int length) static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>ofIntSizePrefixedBytes(int maxSize) static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>ofNullTerminatedBytes(int maxSize) static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>ofShortSizePrefixedBytes(int maxSize) static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>static ByteBufsDecoder<io.activej.bytebuf.ByteBuf>ofVarIntSizePrefixedBytes(int maxSize) tryDecode(io.activej.bytebuf.ByteBufs bufs)
-
Method Details
-
tryDecode
@Nullable T tryDecode(io.activej.bytebuf.ByteBufs bufs) throws io.activej.common.exception.MalformedDataException - Throws:
io.activej.common.exception.MalformedDataException
-
andThen
-
assertBytes
-
ofFixedSize
-
ofNullTerminatedBytes
-
ofNullTerminatedBytes
-
ofCrTerminatedBytes
-
ofCrTerminatedBytes
-
ofCrlfTerminatedBytes
-
ofCrlfTerminatedBytes
-
ofIntSizePrefixedBytes
-
ofIntSizePrefixedBytes
-
ofShortSizePrefixedBytes
-
ofShortSizePrefixedBytes
-
ofByteSizePrefixedBytes
-
ofByteSizePrefixedBytes
-
ofVarIntSizePrefixedBytes
-
ofVarIntSizePrefixedBytes
-