标签:ring new java 用两个 pre string for amp bar
public String bytesToHexString(byte[] bArr) {
StringBuffer sb = new StringBuffer(bArr.length);
String sTmp;
for (int i = 0; i < bArr.length; i++) {
sTmp = Integer.toHexString(0xFF & bArr[i]);
if (sTmp.length() < 2){
sb.append(0);
}
sb.append(sTmp.toUpperCase());
}
return sb.toString();
}
标签:ring new java 用两个 pre string for amp bar
原文地址:https://www.cnblogs.com/guyuedashu/p/12077878.html