类 HexUtil
- java.lang.Object
-
- network.nerve.core.crypto.HexUtil
-
public class HexUtil extends Object
- 作者:
- tag
-
-
构造器概要
构造器 构造器 说明 HexUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <T> TcheckNotNull(T t)验证对象不为nullstatic voidcheckState(boolean status)static byte[]decode(String hexString)对16进制编码的字符串进行解码。static Stringencode(byte[] src)对字节数据进行16进制编码。static booleanisAndroidRuntime()
-
-
-
方法详细资料
-
encode
public static String encode(byte[] src)
对字节数据进行16进制编码。- 参数:
src- 源字节数组- 返回:
- String 编码后的字符串
-
decode
public static byte[] decode(String hexString)
对16进制编码的字符串进行解码。- 参数:
hexString- 源字串- 返回:
- byte[] 解码后的字节数组
-
checkNotNull
public static <T> T checkNotNull(T t)
验证对象不为null- 参数:
t- 对象- 返回:
- T
-
isAndroidRuntime
public static boolean isAndroidRuntime()
-
checkState
public static void checkState(boolean status)
-
-