public void write(int b) throws IOException { if (eof) throw new IOException("Attempt to write to closed stream"); sink.deliver(b); }