Code example for PipedWriter

Methods: close, write

0
     */ 
    public void test_write$CII() throws Exception { 
        // Test for method void java.io.PipedWriter.write(char [], int, int) 
        char[] buf = new char[10];
        "HelloWorld".getChars(0, 10, buf, 0);
        pw = new PipedWriter();
        rdrThread = new Thread(reader = new PReader(pw), "writeCII");
        rdrThread.start();
        pw.write(buf, 0, 10);
        pw.close();
        rdrThread.join(1000);
        assertEquals("Failed to write correct chars", "HelloWorld", new String(
                reader.buf));
    } 
 
    /** 
     * @tests java.io.PipedWriter#write(char[], int, int) Regression for 
     *        HARMONY-387 
     */ 
    public void test_write$CII_2() throws IOException { 
        PipedReader pr = new PipedReader();