Class CodecUtility
java.lang.Object
com.tenio.core.network.zero.codec.CodecUtility
The utility class provides methods to work with packet and binary.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PacketHeader
decodeFirstHeaderByte
(byte headerByte) Decoding the header byte to find the packet header setting.static byte
encodeFirstHeaderByte
(PacketHeader packetHeader) Encoding the packet header setting to a byte value.
-
Method Details
-
decodeFirstHeaderByte
Decoding the header byte to find the packet header setting.- Parameters:
headerByte
- the first read byte- Returns:
- the setup packet header
-
encodeFirstHeaderByte
Encoding the packet header setting to a byte value.- Parameters:
packetHeader
- the packet header instance- Returns:
- the encoded packet header in byte value
-