C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetIndex ( int pos ) : int
InBounds ( int pos ) : bool

Описание методов

FreeBefore() публичный Метод

Call this to notify us that no chars before this absolute position are needed anymore.
public FreeBefore ( int pos ) : void
pos int
Результат void

Get() публичный Метод

public Get ( int posStart, int length ) : char[]
posStart int
length int
Результат char[]

Get() публичный Метод

public Get ( int pos ) : int
pos int
Результат int

Reset() публичный Метод

Clear array and switch to new reader.
public Reset ( TextReader reader ) : void
reader System.IO.TextReader
Результат void