LookAheadBuffer Class
Provides access to a stream and allows to peek at the next characters, up to the buffer's capacity.
public class LookAheadBuffer : ILookAheadBufferRemarks
This class implements a circular buffer with a fixed capacity.
- Implements
Constructors
| Name | Description |
|---|---|
| LookAheadBuffer(TextReader, int) | Initializes a new instance of the LookAheadBuffer class. |
LookAheadBuffer(TextReader, int)
LookAheadBuffer.csInitializes a new instance of the LookAheadBuffer class.
public LookAheadBuffer(TextReader input, int capacity)Parameters
inputTextReader- The input.
capacityint- The capacity.
Properties
| Name | Description |
|---|---|
| EndOfInput | Gets a value indicating whether the end of the input reader has been reached. |
EndOfInput
LookAheadBuffer.csMethods
| Name | Description |
|---|---|
| Cache(int) | Reads characters until at least length characters are in the buffer. |
| Peek(int) | Gets the character at thhe specified offset. |
| Skip(int) | Skips the next length characters. Those characters must have been obtained first by calling the LookAheadBuffer.Peek or LookAheadBuffer.Cache methods. |
Cache(int)
LookAheadBuffer.csPeek(int)
LookAheadBuffer.csSkip(int)
LookAheadBuffer.csSkips the next length characters. Those characters must have been obtained first by calling the LookAheadBuffer.Peek or LookAheadBuffer.Cache methods.
Parameters
lengthint