EncodingTranslatorStream(Stream, Boolean, Encoding, Boolean) - конструктор
Constructor. Specifies an output encoding, and a byte order mark detection option for the input stream
Пространство имён: Tessa.Platform.IOСборка: Tessa (в Tessa.dll) Версия: 3.6.0.22
public EncodingTranslatorStream(
Stream stream,
bool detectInputEncodingFromBOM,
Encoding outputEncoding,
bool disposeStream = false
)
Public Sub New (
stream As Stream,
detectInputEncodingFromBOM As Boolean,
outputEncoding As Encoding,
Optional disposeStream As Boolean = false
)
public:
EncodingTranslatorStream(
Stream^ stream,
bool detectInputEncodingFromBOM,
Encoding^ outputEncoding,
bool disposeStream = false
)
new :
stream : Stream *
detectInputEncodingFromBOM : bool *
outputEncoding : Encoding *
?disposeStream : bool
(* Defaults:
let _disposeStream = defaultArg disposeStream false
*)
-> EncodingTranslatorStream
Параметры
- stream Stream
- Input data, that will be decoded and re-encode into the specified output encoding
- detectInputEncodingFromBOM Boolean
- Indicates whether to look for byte order marks at the beginning of the input stream.
- outputEncoding Encoding
- Output encoding
- disposeStream Boolean (Optional)
- Dispose stream when current object is disposed.
This constructor initializes the encoding to UTF8Encoding.
The detectEncodingFromByteOrderMarks parameter, if true, detects the encoding by looking at the first three bytes of the stream.
It automatically recognizes UTF-8, little-endian Unicode, and big-endian Unicode text if the file starts with the appropriate byte order marks.
Otherwise, the UTF8Encoding is used. See the Encoding.GetPreamble method for more information.