时间:2021-07-01 10:21:17 帮助过:7人阅读
DataInputStream stream = new DataInputStream(new BufferedInputStream(socket.getInputStream, bufferSize))
int length = stream.readInt()
byte[] obj = new byte[length]
stream.readFully(obj)
java端:
DataInputStream stream = new DataInputStream(new BufferedInputStream(socket.getInputStream, bufferSize))
int length = stream.readInt()
byte[] obj = new byte[length]
stream.readFully(obj)
http://blog.csdn.net/guotong1988/article/details/50946032