A character Reader with some additional functionality.
- nested mark-unmark-reset
- current() returns next character that will be read, without consuming it
- string() returns a string since the last mark
- previous() returns the character before the last one readed
This implementation uses a circular buffer with a default size of 64k.
To create a ParserReader from a Reader do:
ParserReader parserReader = ParserReader(reader);
The constructor accepts any reader and returns a new reader with the functions
defined here. |