if (writerClosed) throw new IOException("Writer has been closed; cannot flush a closed writer."); if (readerClosed) throw new IOException("Buffer closed by reader; cannot flush.");
if (writerClosed) throw new IOException("Writer has been closed; cannot flush a closed Writer."); if (readerClosed) throw new IOException("Buffer closed by Reader; cannot flush.");
        public void flush() throws IOException {            if (writerClosed) throw new IOException("Writer has been closed; cannot flush a closed writer.");            if (readerClosed) throw new IOException("Buffer closed by reader; cannot flush.");            // this method needs to do nothing        }