C# Class AsmHighlighter.Lexer.Scanner.TextBuff

This is the Buffer for UTF8 files. It attempts to read the encoding preamble, which for this encoding should be unicode point \uFEFF which is encoded as EF BB BF
Inheritance: ScanBuff
Exibir arquivo Open project: Trass3r/AsmHighlighter

Protected Properties

Property Type Description
bStrm System.IO.BufferedStream
delta int

Public Methods

Method Description
GetString ( int beg, int end ) : string

Returns the string from the buffer between the given file positions. This needs to be done carefully, as the number of characters is, in general, not equal to (end - beg).

NewTextBuff ( Stream strm ) : TextBuff

TextBuff factory. Reads the file preamble and returns a TextBuff, LittleEndTextBuff or BigEndTextBuff according to the result.

Peek ( ) : int
Read ( ) : int

Protected Methods

Method Description
TextBuff ( Stream str ) : System

Private Methods

Method Description
BadUTF8 ( ) : Exception

Method Details

GetString() public final method

Returns the string from the buffer between the given file positions. This needs to be done carefully, as the number of characters is, in general, not equal to (end - beg).
public final GetString ( int beg, int end ) : string
beg int Begin filepos
end int End filepos
return string

NewTextBuff() public static method

TextBuff factory. Reads the file preamble and returns a TextBuff, LittleEndTextBuff or BigEndTextBuff according to the result.
public static NewTextBuff ( Stream strm ) : TextBuff
strm Stream The underlying stream
return TextBuff

Peek() public final method

public final Peek ( ) : int
return int

Read() public method

public Read ( ) : int
return int

TextBuff() protected method

protected TextBuff ( Stream str ) : System
str Stream
return System

Property Details

bStrm protected_oe property

protected BufferedStream,System.IO bStrm
return System.IO.BufferedStream

delta protected_oe property

protected int delta
return int