C# Class bsharptree.example.simpleindex.analysis.Utf8CharScanner

Show file Open project: thoward/bsharptree Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
Read ( ) : CharLocation

Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.

Subclasses that intend to support efficient single-character input should override this method.

Read ( char buffer, int offset, int length ) : int

Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

Reset ( ) : void
Skip ( long charsToSkip ) : long

Skip characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached.

Utf8CharScanner ( Stream inputStream ) : System.IO
Utf8CharScanner ( Stream inputStream, byte buffer ) : System.IO
Utf8CharScanner ( Stream inputStream, int size ) : System.IO

Private Methods

Method Description
GetCurrentPosition ( int index ) : long
ReadFourByteChar ( int index, int byteZero ) : char?
ReadThreeByteChar ( int index, int byteZero ) : char?
ReadTwoByteChar ( int index, int byteZero ) : char?
ThrowExpectedByteException ( int position, int count ) : void

Throws an exception for expected byte.

ThrowInvalidByteException ( int position, int count, int c ) : void

Throws an exception for invalid byte.

ThrowInvalidSurrogateException ( int uuuuu ) : void

Throws an exception for invalid surrogate bits.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Read() public method

Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.

Subclasses that intend to support efficient single-character input should override this method.

public Read ( ) : CharLocation
return CharLocation

Read() public method

Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
public Read ( char buffer, int offset, int length ) : int
buffer char Destination buffer
offset int Offset at which to start storing characters
length int Maximum number of characters to read
return int

Reset() public method

public Reset ( ) : void
return void

Skip() public method

Skip characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached.
public Skip ( long charsToSkip ) : long
charsToSkip long The number of characters to skip
return long

Utf8CharScanner() public method

public Utf8CharScanner ( Stream inputStream ) : System.IO
inputStream System.IO.Stream
return System.IO

Utf8CharScanner() public method

public Utf8CharScanner ( Stream inputStream, byte buffer ) : System.IO
inputStream System.IO.Stream
buffer byte
return System.IO

Utf8CharScanner() public method

public Utf8CharScanner ( Stream inputStream, int size ) : System.IO
inputStream System.IO.Stream
size int
return System.IO