C# Class YamlDotNet.Core.LookAheadBuffer

Inheritance: ILookAheadBuffer
Show file Open project: aaubry/YamlDotNet

Public Methods

Method Description
Cache ( int length ) : void

Reads characters until at least length characters are in the buffer.

LookAheadBuffer ( TextReader input, int capacity ) : System

Initializes a new instance of the LookAheadBuffer class.

Peek ( int offset ) : char

Gets the character at thhe specified offset.

Skip ( int length ) : void

Skips the next length characters. Those characters must have been obtained first by calling the Peek or Cache methods.

Private Methods

Method Description
GetIndexForOffset ( int offset ) : int

Gets the index of the character for the specified offset.

Method Details

Cache() public method

Reads characters until at least length characters are in the buffer.
public Cache ( int length ) : void
length int /// Number of characters to cache. ///
return void

LookAheadBuffer() public method

Initializes a new instance of the LookAheadBuffer class.
public LookAheadBuffer ( TextReader input, int capacity ) : System
input System.IO.TextReader The input.
capacity int The capacity.
return System

Peek() public method

Gets the character at thhe specified offset.
public Peek ( int offset ) : char
offset int
return char

Skip() public method

Skips the next length characters. Those characters must have been obtained first by calling the Peek or Cache methods.
public Skip ( int length ) : void
length int
return void