Class BinaryUtils


  • public class BinaryUtils
    extends Object
    Utilities for encoding and decoding binary data to and from different forms.
    • Constructor Detail

      • BinaryUtils

        public BinaryUtils()
    • Method Detail

      • toHex

        public static String toHex​(byte[] data)
        Converts byte data to a Hex-encoded string.
        Parameters:
        data - data to hex encode.
        Returns:
        hex-encoded string.
      • fromHex

        public static byte[] fromHex​(String hexData)
        Converts a Hex-encoded data string to the original byte data.
        Parameters:
        hexData - hex-encoded data to decode.
        Returns:
        decoded data from the hex string.