Package org.apache.rat.header
Class LineNumberReader
- java.lang.Object
-
- org.apache.rat.header.LineNumberReader
-
public class LineNumberReader extends java.lang.ObjectReplacement forLineNumberReader. This class provides a workaround for an incompatibility in theLineNumberReader: If the last line in a file isn't terminated with LF, or CR, or CRLF, then that line is counted in Java 16, and beyond, but wasn't counted before. This implementation is compatible with the latter variant, thus providing upwards compatibility for RAT.
-
-
Field Summary
Fields Modifier and Type Field Description private intlineNumberprivate java.io.Readerparentprivate booleanpreviousCharWasCR
-
Constructor Summary
Constructors Constructor Description LineNumberReader(java.io.Reader pReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLineNumber()intread()
-