/** * This is used to flush the internal buffer to the underlying * socket. Flushing with this method is always non-blocking, so * if the socket is not write ready and the buffer can be queued * it will be queued and the calling thread will return. */ public void flush() throws IOException { if(closed) { throw new TransportException("Transport is closed"); } writer.flush(); }
/** * This is used to flush the internal buffer to the underlying * socket. Flushing with this method is always non-blocking, so * if the socket is not write ready and the buffer can be queued * it will be queued and the calling thread will return. */ public void flush() throws IOException { if(closed) { throw new TransportException("Transport is closed"); } writer.flush(); }
/** * This method is used to flush the internal buffer and close * the underlying socket. This method will not complete until * all buffered data is written and the underlying socket is * closed at which point this can be disposed of. */ public void close() throws IOException { if(!closed) { writer.flush(); writer.close(); closed = true; } } }
/** * This method is used to flush the internal buffer and close * the underlying socket. This method will not complete until * all buffered data is written and the underlying socket is * closed at which point this can be disposed of. */ public void close() throws IOException { if(!closed) { writer.flush(); writer.close(); closed = true; } } }