java接收c语言的结构体
DataInputStream inputStream = new DataInputStream(s.getInputStream());
int read = 0;
if (inputStream != null) {
read = inputStream.read(buf);
}
if (read == -1) {
break;
}
System.out.println(new String(buf,0,read));
结果,取到的字母是对的,数字不对(乱码),请问如何解决
[解决办法]
既然是结构体
当然也是以位读,以位转换,怎么会直接一个string就完事了...
[解决办法]