Class HexSupport


  • public final class HexSupport
    extends Object
    Used to convert to hex from byte arrays and back.
    • Method Detail

      • toBytesFromHex

        public static byte[] toBytesFromHex​(String hex)
        Parameters:
        hex -
        Returns:
        array of bytes
      • toHexFromBytes

        public static String toHexFromBytes​(byte[] bytes)
        Parameters:
        bytes -
        Returns:
        string hex value
      • toHexFromInt

        public static String toHexFromInt​(int value,
                                          boolean trim)
        Parameters:
        value -
        trim - if the leading 0's should be trimmed off.
        Returns:
        string hex value