Code example for LineNumberInputStream

Methods: closeavailable

    LineNumberInputStream lnis2;
    public void test_available() throws IOException { 
        assertEquals("Test 1: Returned incorrect number of available bytes;",
                text.length() / 2, lnis.available());
        try { 
            fail("Test 2: IOException expected.");
        } catch (IOException e) {
            // Expected. 
    public void test_read() throws IOException { 
        assertEquals("Test 1: Failed to read correct byte;",
        assertEquals("Test 2: Failed to read correct byte on dos text;",
Stop searching for code, let great code find you!  Add Codota to your java IDE