Code example for LineNumberInputStream

Methods: closeread

0
        } 
    } 
 
    public void test_read$BII() throws IOException { 
        byte[] buf = new byte[100];
        lnis.read(buf, 0, 100);
        assertTrue("Test 1: Incorrect bytes read.",
                new String(buf, 0, 100).equals(text.substring(0, 100)));
 
        lnis.close();
        try { 
            lnis.read(buf, 0, 100);
            fail("Test 2: IOException expected.");
        } catch (IOException e) {
            // Expected. 
        } 
    } 
 
    public void test_read$BII_Exception() throws IOException { 
        byte[] buf = new byte[10];