A BufferedReader which returns line terminators
April 7, 2011
Leave a comment
I am working on a parser which must take into account line numbers, and make correlations between them and document’s offsets. For instance, I need to know at which line is the character #145 of a given text file. The problem is that different OSs use different line terminators: \n on Linux, \r\n on Windows, \r on Mac.
Categories: development, java, opensource
