PHP socket_write 如何与 java的readFully 对接?
程序员文章站
2022-05-28 19:46:28
...
java端:
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
上一篇: 有人恶意测试你网站的并发量 如何处理?