Code example for CharArrayReader

Methods: close, read

0
 
    /** 
     * java.io.CharArrayReader#close() 
     */ 
    public void test_close() { 
        cr = new CharArrayReader(hw);
        cr.close();
        try { 
            cr.read();
            fail("Failed to throw exception on read from closed stream");
        } catch (IOException e) {
            // Expected. 
        } 
 
    } 
 
    /** 
     * java.io.CharArrayReader#mark(int) 
     */ 
    public void test_markI() throws IOException { 
        cr = new CharArrayReader(hw);