类 HexUtil


  • public class HexUtil
    extends Object
    This class provides convenient functions to convert hex string to byte array and vice versa.
    作者:
    99bill
    • 方法详细资料

      • toHexString

        public static String toHexString​(byte[] b)
        Converts a byte array to hex string.
        参数:
        b - - the input byte array
        返回:
        hex string representation of b.
      • toByteArray

        public static byte[] toByteArray​(String s)
        Converts a hex string into a byte array.
        参数:
        s - - string to be converted
        返回:
        byte array converted from s