/** * This is used to close the writer and the underlying socket. * If a close is performed on the writer then no more bytes * can be read from or written to the writer and the client * will receive a connection close on their side. */ public void close() throws IOException { flusher.close(); writer.close(); } }