Why does OutputStream.write() closes socket connection?
事实并非如此。它将数据写入 OutputStream。
some times (lets say 50% of times) that I call the OutputStream.write() method of the socket connection, the servers log shows that the client closed connection.
不,它没有。这是它真正显示的内容:
When I execute the OutputStram.Write(), the server shows on screen: "Connection to client closed".