public String Str2Hex(String original){
byte[] bytes = original.getBytes();
String hs = "";
for (int n = 0; n < bytes.length; n++) {
hs += (Integer.toHexString(bytes[n] & 0XFF));
}
return hs.toUpperCase();
}
字符串怎么转换成十六进制数?
最新推荐文章于 2024-08-05 16:37:39 发布