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.
Afficher le fichier Open project: apache/lucenenet Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
GetIndex ( int pos ) : int
InBounds ( int pos ) : bool

Method Details

FreeBefore() public méthode

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

Get() public méthode

public Get ( int posStart, int length ) : char[]
posStart int
length int
Résultat char[]

Get() public méthode

public Get ( int pos ) : int
pos int
Résultat int

Reset() public méthode

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