EncodingTranslatorStream(Stream, Encoding, Encoding, Boolean) - конструктор |
Constructor. Specifies the input and output encoding.
Пространство имён:
Tessa.Platform.IO
Сборка:
Tessa (в Tessa.dll) Версия: 3.5.0.19
Синтаксис public EncodingTranslatorStream(
Stream stream,
Encoding streamEncoding,
Encoding outputEncoding,
bool disposeStream = false
)
Public Sub New (
stream As Stream,
streamEncoding As Encoding,
outputEncoding As Encoding,
Optional disposeStream As Boolean = false
)
public:
EncodingTranslatorStream(
Stream^ stream,
Encoding^ streamEncoding,
Encoding^ outputEncoding,
bool disposeStream = false
)
new :
stream : Stream *
streamEncoding : Encoding *
outputEncoding : Encoding *
?disposeStream : bool
(* Defaults:
let _disposeStream = defaultArg disposeStream false
*)
-> EncodingTranslatorStream
Параметры
- stream
- Тип: System.IOStream
Input data, that will be decoded and re-encode into the specified output encoding - streamEncoding
- Тип: System.TextEncoding
The input character encoding to use. - outputEncoding
- Тип: System.TextEncoding
Output encoding - disposeStream (Optional)
- Тип: SystemBoolean
Dispose stream when current object is disposed.
Заметки
The character encoding is set by the encoding parameter.
The StreamReader object attempts to detect 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 user-provided encoding is used.
См. также