Click or drag to resize

AsciiDocumentAnalysisGetStreamReader Method

Gets a StreamReader along with the detected encoding and the number of BOM bytes.

Namespace: Altaxo.Serialization.Ascii
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3618.0 (4.8.3618.0)
Syntax
C#
public static (StreamReader streamReader, Encoding usedEncoding, int numberOfBomBytes) GetStreamReader(
	Stream stream,
	Encoding importOptionsEncoding,
	bool importOptionsDetectEncodingFromByteOrderMarks,
	int numberOfLinesToAnalyze
)

Parameters

stream  Stream
The underlying stream to read from. Is left open, even if the returned StreamReader is disposed.
importOptionsEncoding  Encoding
The proposed encoding to use if no BOM is detected.
importOptionsDetectEncodingFromByteOrderMarks  Boolean
Whether to detect the encoding from byte order marks.
numberOfLinesToAnalyze  Int32
The number of lines to analyze for encoding detection.

Return Value

ValueTupleStreamReader, Encoding, Int32
A tuple containing the StreamReader, the detected Encoding, and the number of BOM bytes.
See Also