更新时间:2021-10-25 07:57:59
您需要:
DataOutputStream.writeLong()
是什么,以及 DataInputStream.readLong()
在接收器。李>
在接收从流中读取正是很多字节:
DataOutputStream.writeLong()
for that, and DataInputStream.readLong()
at the receiver.Read exactly that many bytes from the stream at the receiver:
while (total < length && (count = in.read(buffer, 0, length-total > buffer.length ? buffer.length : (int)(length-total))) > 0)
{
out.write(buffer, 0, count);
total += count;
}
E&放大器; OE
E&OE
其实我想重置套接字连接
Actually I want to reset socket connection
其实你不想做任何这样的事情。
Actually you don't want to do any such thing.