日期:2014-05-17 浏览次数:20788 次
public static String GetX(byte[] t) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < t.length; i++) {
int v = t[i] & 0xFF;
String hv = Integer.toHexString(v);
if (hv.length() < 2) {
sb.append(0);
}
sb.append(hv);
}
return sb.toString();
}