C# Class Lucene.Net.Analysis.Util.RollingCharBuffer

Acts like a forever growing char[] as you read characters into it from the provided reader, but internally it uses a circular buffer to only hold the characters that haven't been freed yet. This is like a PushbackReader, except you don't have to specify up-front the max size of the buffer, but you do have to periodically call #freeBefore.
Mostrar archivo Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
FreeBefore ( int pos ) : void

Call this to notify us that no chars before this absolute position are needed anymore.

Get ( int posStart, int length ) : char[]
Get ( int pos ) : int
Reset ( TextReader reader ) : void

Clear array and switch to new reader.

Private Methods

Method Description
GetIndex ( int pos ) : int
InBounds ( int pos ) : bool

Method Details

FreeBefore() public method

Call this to notify us that no chars before this absolute position are needed anymore.
public FreeBefore ( int pos ) : void
pos int
return void

Get() public method

public Get ( int posStart, int length ) : char[]
posStart int
length int
return char[]

Get() public method

public Get ( int pos ) : int
pos int
return int

Reset() public method

Clear array and switch to new reader.
public Reset ( TextReader reader ) : void
reader System.IO.TextReader
return void