Code example for CharArrayWriter

Methods: toCharArraywrite

0
 
    /** 
     * @tests java.io.CharArrayWriter#write(char[], int, int) 
     */ 
    public void test_write$CII() throws IOException { 
        cw.write(hw, 5, 5);
        cr = new CharArrayReader(cw.toCharArray());
        char[] c = new char[100];
        cr.read(c, 0, 5);
        assertEquals("Writer failed to write correct chars", "World",
                new String(c, 0, 5));
    } 
 
    /** 
     * @tests java.io.CharArrayWriter#write(char[], int, int) 
     */ 
    public void test_write$CII_2() { 
        // Regression for HARMONY-387 
        CharArrayWriter obj = new CharArrayWriter();
        try {