byte[] 轉 String16進制
private void cs(byte[] da)
String hex="";
for(int i=0;i<da.length;i++){
hex = Integer.toHexString(da[i] & 0xFF);
if (hex.length() == 1) {
hex='0' + hex;
}
/**
* 處理數據 根據協議
*/
System.out.println("log----date---"+i+": "+hex);
}
}
傳個byte[]的值進去