An efficient implementation of JavaCC's CharStream interface. Note that
/// this does not do line-number counting, but instead keeps track of the
/// character position of the token in the input, as required by Lucene's {@link
/// Lucene.Net.Analysis.Token} API.
///
public sealed class FastCharStream : CharStream
{
internal char[] buffer = null;
internal int bufferLength = 0; // end of valid chars
internal int bufferPosition = 0; // next char to read
internal int tokenStart = 0; // offset in buffer
internal int bufferStart = 0; // position in file of buffer
internal System.IO.TextReader input; // source of chars
///