Type Reason Java.IO.IOException if an error occurs while closing the socket output stream. Java.Net.SocketException if the output stream is already closed.
Closes the output stream of this socket. All buffered data will be sent followed by the termination sequence. Writing to the closed output stream will cause an IOException.