java端:
<code>DataInputStream stream = new DataInputStream(new BufferedInputStream(socket.getInputStream, bufferSize)) int length = stream.readInt() byte[] obj = new byte[length] stream.readFully(obj)</code>
java端:
<code>DataInputStream stream = new DataInputStream(new BufferedInputStream(socket.getInputStream, bufferSize)) int length = stream.readInt() byte[] obj = new byte[length] stream.readFully(obj)</code>
http://blog.csdn.net/guotong1988/article/details/50946032