public LineReader(InputStream stream, boolean backwards) {
this.readBackwards = backwards;
this.streamReader = new InputStreamReader(stream);
tokenizer = new Tokenizer(streamReader);
tokenizer.addSymbol(new TokenizerSymbol(LINE_SEPARATOR, "\n", null, false, false, true, false));
tokenizer.addSymbol(new TokenizerSymbol(LINE_SEPARATOR, "\r", null, false, false, true, false));
if (backwards) {
tokenizer.addSymbol(new TokenizerSymbol(LINE_SEPARATOR, "\n\r", null, false, false, true, false));