byte数组转16进制
private static final char[] HEX_CHARS = {'0','1','2','3','4','5','6','7','8','9','a','b',...'c','d','e','f'};
/*
* byte[]数组转十六进制
*/
public static String bytes2hexStr(byte[] bytes) {
int len =...[(bytes[i] >>> 4) & 0xf];
cbuf[x + 1] = HEX_CHARS[bytes[i] & 0xf];
}
return new String(cbuf);
}
16进制转byte...数组
/**
* hex字符串转byte数组
*
* @param inHex 待转换的Hex字符串
* @return 转换后的byte数组结果
*/
public static byte[... result[j] = hexToByte(inHex.substring(i, i + 2));
j++;
}
return result;
}
16进制转10