C# Class CsQuery.HtmlParser.BOMReader

A class to parse and expose information about the byte order marks (BOM) for a stream.
Mostrar archivo Open project: prepare/HTML-Renderer Class Usage Examples

Public Methods

Method Description
BOMReader ( Stream stream ) : System

Default constructor.

GetEncoding ( Encoding defaultEncoding ) : Encoding

Gets the encoding, or the default encoding provided if no explicit encoding is available

Protected Methods

Method Description
Parse ( ) : void

Parses the input stream to obtain an encoding

Private Methods

Method Description
GetEncodingFromXML ( ) : Encoding
GetFileEncoding ( ) : Encoding
Matches ( byte buffer ) : bool

Test if the header matches the bytes passed (up to the length of the array passed)

Method Details

BOMReader() public method

Default constructor.
public BOMReader ( Stream stream ) : System
stream Stream /// The stream to analyze. ///
return System

GetEncoding() public method

Gets the encoding, or the default encoding provided if no explicit encoding is available
public GetEncoding ( Encoding defaultEncoding ) : Encoding
defaultEncoding System.Text.Encoding
return System.Text.Encoding

Parse() protected method

Parses the input stream to obtain an encoding
protected Parse ( ) : void
return void