Code example for CharArrayReader

Methods: closemarkreadresetskip

0
 
    /** 
     * java.io.CharArrayReader#mark(int) 
     */ 
    public void test_markI() throws IOException { 
        cr = new CharArrayReader(hw);
        cr.skip(5L);
        cr.mark(100);
        cr.read();
        cr.reset();
        assertEquals("Test 1: Failed to mark correct position;",
                'W', cr.read());
 
        cr.close();
        try { 
            cr.mark(100);
            fail("Test 2: IOException expected.");
        } catch (IOException e) {
            // Expected. 
        } 
    } 
Connect your IDE to all the code out there  Get Codota for Java