Code example for PipedOutputStream

Methods: close

0
            // Expected. 
        } 
    } 
 
    public void test_close() { 
        out = new PipedOutputStream();
        rt = new Thread(reader = new PReader(out));
        rt.start();
        try { 
            out.close();
        } catch (IOException e) {
            fail("Test 1: Unexpected IOException: " + e.getMessage());
        } 
    } 
 
    public void test_connectLjava_io_PipedInputStream() throws IOException { 
        out = new PipedOutputStream();
 
        try { 
            out.connect(new PipedInputStream());