@Test public void testNotConnectedByteWrite () { try { out.write(testByte, 0, 1); fail("This test should have thrown an IOException already"); } catch (IOException e) { assertEquals("Pipe not connected", e.getMessage()); return; } catch (NullPointerException e) { fail("The byte is most likely null"); } catch (IndexOutOfBoundsException e) { fail ("The offset or write length is invalid"); } fail("This test should have caught an IOException"); }
public void write(int b) throws IOException { if (sink == null) { throw new IOException("Pipe not connected"); } sink.receive(b); }
NoClosePipedOutputStream extends OutputStream { public void write(int b) throws IOException { if (sink == null) { throw new IOException("Pipe not connected"); } sink.receive(b); } }
NoClosePipedOutputStream extends OutputStream { public void write(int b) throws IOException { if (sink == null) { throw new IOException("Pipe not connected"); } sink.receive(b); } NoClosePipedOutputStream(NoClosePipedInputStream snk);  NoClosePipedOutputStream(); }
NoClosePipedOutputStream extends OutputStream { public void write(int b) throws IOException { if (sink == null) { throw new IOException("Pipe not connected"); } sink.receive(b); } NoClosePipedOutputStream(NoClosePipedInputStream snk);  NoClosePipedOutputStream(); synchronized void connect(NoClosePipedInputStream snk); void write(int b); void write(byte b[], int off, int len); }
NoClosePipedOutputStream extends OutputStream { public void write(int b) throws IOException { if (sink == null) { throw new IOException("Pipe not connected"); } sink.receive(b); } NoClosePipedOutputStream(NoClosePipedInputStream snk);  NoClosePipedOutputStream(); synchronized void connect(NoClosePipedInputStream snk); void write(int b); void write(byte b[], int off, int len);  }