欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

相关标签: php java