StringBuilder str = new StringBuilder();
for (int i = 0; i < b.length; i++) {
int v = b[i] & 0xFF;
String hv = Integer.toHexString(v);
if (hv.length() < 2) {
str.append(0);
}
if (i == b.length-1) {
str.append(hv);
} else {
str.append(hv + " ");
}
}
String errorMsg = "处理消息时,收到了未经解码的字节数组【" + str + "】";