Code example for LineNumberReader

Methods: read

0
            // Expected. 
        } 
    } 
 
    public void test_read$CII_Exception() throws IOException { 
        lnr = new LineNumberReader(new StringReader(text));
        char[] c = new char[10];
 
        try { 
            lnr.read(c, -1, 1);
            fail("IndexOutOfBoundsException expected.");
        } catch (IndexOutOfBoundsException e) {
            // Expected. 
        } 
 
        try { 
            lnr.read(c, 0, -1);
            fail("IndexOutOfBoundsException expected.");
        } catch (IndexOutOfBoundsException e) {
            // Expected. 
        } 
 
        try { 
            lnr.read(c, 10, 1);
            fail("IndexOutOfBoundsException expected.");
        } catch (IndexOutOfBoundsException e) {
            // Expected. 
        } 
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE