java.net.SocketException socket is closed
java.net.SocketException socket is closed
java.net.SocketException socket is closed
This exception means that you closed the socket, and then continued to try to use it.
os.close();
And you closed it here. Closing either the input or the output stream of a Socket
closes the other stream and the Socket.