Code example for LineNumberInputStream

Methods: getLineNumberskip

0
 
    /** 
     * @tests java.io.LineNumberInputStream#skip(long) 
     */ 
    public void test_skipJ() throws IOException { 
        lnis.skip(4);
        assertEquals("Skip failed to increment lineNumber", 2, lnis
                .getLineNumber());
    } 
 
    /** 
     * Sets up the fixture, for example, open a network connection. This method 
     * is called before a test is executed. 
     */ 
    protected void setUp() throws UnsupportedEncodingException { 
        /* 
         * In order for IOException to be thrown in reset(),the inputStream to 
         * the constructor cannot be a byteArrayInputstream because the reset() 
         * in byteArrayInputStream does not throw IOException. When 
         * BufferedInputStream is used, the size of the buffer must be smaller 
         * than the readlimit in mark inorder for IOException to be thrown