Interface BinaryCodec

    • Method Detail

      • encode

        String encode​(byte[] data)
        Parameters:
        data - the binary data to encode.
        Returns:
        the given data encoded as String.
      • encodeShort

        default String encodeShort​(short value)
        Parameters:
        value - the short value to encode.
        Returns:
        the given value encoded as String using BigEndian.
      • encodeInt

        default String encodeInt​(int value)
        Parameters:
        value - the int value to encode.
        Returns:
        the given value encoded as String using BigEndian.
      • encodeLong

        default String encodeLong​(long value)
        Parameters:
        value - the long value to encode.
        Returns:
        the given value encoded as String using BigEndian.
      • decode

        byte[] decode​(String encodedData)
        Parameters:
        encodedData - the encoded String.
        Returns:
        the decoded data as byte array.
      • decodeShort

        default short decodeShort​(String encodedData)
        Parameters:
        encodedData - the encoded String.
        Returns:
        the decoded value.
      • decodeInt

        default int decodeInt​(String encodedData)
        Parameters:
        encodedData - the encoded String.
        Returns:
        the decoded value.
      • decodeLong

        default long decodeLong​(String encodedData)
        Parameters:
        encodedData - the encoded String.
        Returns:
        the decoded value.