Partilhar via


IEncodingDetector.GetStreamEncoding(Stream) Method

Definition

Attempts to detect an encoding associated with a stream.

public:
 System::Text::Encoding ^ GetStreamEncoding(System::IO::Stream ^ stream);
public System.Text.Encoding GetStreamEncoding (System.IO.Stream stream);
abstract member GetStreamEncoding : System.IO.Stream -> System.Text.Encoding
Public Function GetStreamEncoding (stream As Stream) As Encoding

Parameters

stream
Stream

The stream to read.

Returns

The detected encoding, or null if one could not be determined.

Remarks

The stream is read from its current position. The encoding sniffer does not need to reset the stream's position.

Applies to