java.lang.Object
cn.suredoc.sdk.device.protocol.base.utils.HexUtils

public class HexUtils extends Object
  • Constructor Details

    • HexUtils

      public HexUtils()
  • Method Details

    • toByteArray

      public static byte[] toByteArray(String hex)
      将十六进制字符串转换为字节数组
      Parameters:
      hex - 十六进制字符串
      Returns:
    • toHex

      public static String toHex(byte[] bytes)
      将字节数组转换为十六进制字符串
      Parameters:
      bytes - 字节流
      Returns:
    • decodeHexStr

      public static String decodeHexStr(String hex)
      将十六进制字符数组转换为字符串,编码UTF-8
      Parameters:
      hex - 十六进制字符串
      Returns: