Tag: java adding line numbers

LineNumberReader Java

April 24, 2011 · 1 min read
The character stream **LineNumberReader** is equivalent to **[LineNumberInputStream](http://way2java.com/io/giving-line-numbers-linenumberinputstream/)** on byte streams side. Being a subclass of BufferedReader, it can make use of all the methods of BufferedReader like **readLine()** to read a line. **getLineNumber()** method of this class can be used to give line numbers.