Code example for PipedOutputStream

Methods: write

0
	 * @tests java.io.PipedInputStream#close() 
	 */ 
	public void test_close() throws IOException { 
		// Test for method void java.io.PipedInputStream.close() 
		pis = new PipedInputStream();
		pos = new PipedOutputStream();
        pis.connect(pos);
        pis.close();
		try { 
			pos.write((byte) 127);
            fail("Failed to throw expected exception");
		} catch (IOException e) {
			// The spec for PipedInput saya an exception should be thrown if 
			// a write is attempted to a closed input. The PipedOuput spec 
			// indicates that an exception should be thrown only when the 
			// piped input thread is terminated without closing 
			return; 
		} 
	} 
 
	/**