- private static String byte2hex(byte [] buffer){
- String h = "";
- for(int i = 0; i < buffer.length; i++){
- String temp = Integer.toHexString(buffer[i] & 0xFF);
- if(temp.length() == 1){
- temp = "0" + temp;
- }
- h = h + " "+ temp;
- }
- return h;
- }
将byte数组按16进制的方式输出
最新推荐文章于 2023-10-12 00:33:12 发布