Code example for CharArrayReader

Methods: ready

0
 
    /** 
     * @tests java.io.CharArrayReader#CharArrayReader(char[]) 
     */ 
    public void test_Constructor$C() throws IOException { 
        cr = new CharArrayReader(hw);
        assertTrue("Failed to create reader", cr.ready());
    } 
 
    /** 
     * @tests java.io.CharArrayReader#CharArrayReader(char[], int, int) 
     */ 
    public void test_Constructor$CII() throws IOException { 
        cr = new CharArrayReader(hw, 5, 5);
        assertTrue("Failed to create reader", cr.ready());
 
        int c = cr.read();
        assertTrue("Created incorrect reader--returned '" + (char) c
                + "' intsead of 'W'", c == 'W');
    }