/**
* 十六进制字符串转二进制字符串
* @param hexStr 十六进制字符串
* @return 二进制字符串
*/
public static String hexToBin(String hexStr) {
String hexToBinStr = "";
try {
hexToBinStr = Long.toBinaryString(Long.valueOf(hexStr, 16));
} catch (NumberFormatException e) {
e.printStackTrace();
}
return hexToBinStr;
}
网友评论