Click or drag to resize
MimeKit

HtmlTokenizer(Stream, Encoding, Boolean, Int32) Constructor

Initialize a new instance of the HtmlTokenizer class.

Namespace: MimeKit.Text
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public HtmlTokenizer(
	Stream stream,
	Encoding encoding,
	bool detectEncodingFromByteOrderMarks,
	int bufferSize = 4096
)

Parameters

stream  Stream
The input stream.
encoding  Encoding
The charset encoding of the stream.
detectEncodingFromByteOrderMarks  Boolean
true if byte order marks should be detected and used to override the encoding; otherwise, false.
bufferSize  Int32  (Optional)
The minimum buffer size to use for reading.
Remarks

Creates a new HtmlTokenizer.

This constructor allows you to change the encoding the first time you read from the HtmlTokenizer. The detectEncodingFromByteOrderMarks parameter detects the encoding by looking at the first four bytes of the stream. It will automatically recognize UTF-8, little-endian UTF-16, big-endian UTF-16, little-endian UTF-32, and big-endian UTF-32 text if the stream starts with the appropriate byte order marks. Otherwise, the user-provided encoding is used.

See Also