Package io.activej.codec.binary
Class BinaryUtils
java.lang.Object
io.activej.codec.binary.BinaryUtils
public final class BinaryUtils extends Object
-
Constructor Summary
Constructors Constructor Description BinaryUtils() -
Method Summary
Modifier and Type Method Description static <T> Tdecode(StructuredDecoder<T> decoder, byte[] bytes)static <T> Tdecode(StructuredDecoder<T> decoder, ByteBuf buf)static <T> ByteBufencode(StructuredEncoder<T> encoder, T item)static <T> byte[]encodeAsArray(StructuredEncoder<T> encoder, T item)static <T> voidencodeInto(StructuredEncoder<T> encoder, T item, ByteBuf dest)static <T> ByteBufencodeWithSizePrefix(StructuredEncoder<T> encoder, T item)
-
Constructor Details
-
BinaryUtils
public BinaryUtils()
-
-
Method Details
-
decode
public static <T> T decode(StructuredDecoder<T> decoder, byte[] bytes) throws MalformedDataException- Throws:
MalformedDataException
-
decode
public static <T> T decode(StructuredDecoder<T> decoder, ByteBuf buf) throws MalformedDataException- Throws:
MalformedDataException
-
encode
-
encodeAsArray
-
encodeInto
-
encodeWithSizePrefix
-