Skip to content

工具类

Lijian edited this page May 19, 2018 · 2 revisions

HexUtil

byte[]转String,参数addSpace表示每一位之间是否增加空格,常用于打印日志。

String formatHexString(byte[] data, boolean addSpace)

String转byte[]

byte[] hexStringToBytes(String hexString)

byte[]转char[],参数toLowerCase表示大小写

char[] encodeHex(byte[] data, boolean toLowerCase)