StreamReader()

StreamReader::StreamReader(const SharedPtr<Stream>&) constructor

Constructs an instance of StreamReader object that reads characters from the specified underlying stream using UTF-8 encoding and a buffer with default size of 1024 bytes.

System::IO::StreamReader::StreamReader(const SharedPtr<Stream> &stream)

Arguments

ParameterTypeDescription
streamconst SharedPtr<Stream>&The underlying stream to read characters from

StreamReader::StreamReader(const SharedPtr<Stream>&, bool) constructor

Constructs an instance of StreamReader object that reads characters from the specified underlying stream using UTF-8 encoding and a buffer with default size of 1024 bytes. A parameter specifies if byte order mark detection should be enabled.

System::IO::StreamReader::StreamReader(const SharedPtr<Stream> &stream, bool detectEncodingFromByteOrderMarks)

Arguments

ParameterTypeDescription
streamconst SharedPtr<Stream>&The underlying stream to read characters from
detectEncodingFromByteOrderMarksboolTrue to look for byte order marks at the beginning of the stream, otherwise - false

StreamReader::StreamReader(const SharedPtr<Stream>&, const EncodingPtr&) constructor

Constructs an instance of StreamReader object that reads characters from the specified underlying stream using the specified encoding and a buffer with default size of 1024 bytes.

System::IO::StreamReader::StreamReader(const SharedPtr<Stream> &stream, const EncodingPtr &encoding)

Arguments

ParameterTypeDescription
streamconst SharedPtr<Stream>&The underlying stream to read characters from
encodingconst EncodingPtr&The encoding to use

StreamReader::StreamReader(const SharedPtr<Stream>&, const EncodingPtr&, bool) constructor

Constructs an instance of StreamReader object that reads characters from the specified underlying stream using the specified encoding and a buffer with default size of 1024 bytes. A parameter specifies if byte order mark detection should be enabled.

System::IO::StreamReader::StreamReader(const SharedPtr<Stream> &stream, const EncodingPtr &encoding, bool detectEncodingFromByteOrderMarks)

Arguments

ParameterTypeDescription
streamconst SharedPtr<Stream>&The underlying stream to read characters from
encodingconst EncodingPtr&The encoding to use
detectEncodingFromByteOrderMarksboolTrue to look for byte order marks at the beginning of the stream, otherwise - false

StreamReader::StreamReader(const SharedPtr<Stream>&, const EncodingPtr&, bool, int) constructor

Constructs an instance of StreamReader object that reads characters from the specified underlying stream using the specified encoding and a buffer of the specified size. A parameter specifies if byte order mark detection should be enabled.

System::IO::StreamReader::StreamReader(const SharedPtr<Stream> &stream, const EncodingPtr &encoding, bool detectEncodingFromByteOrderMarks, int bufferSize)

Arguments

ParameterTypeDescription
streamconst SharedPtr<Stream>&The underlying stream to read characters from
encodingconst EncodingPtr&The encoding to use
detectEncodingFromByteOrderMarksboolTrue to look for byte order marks at the beginning of the stream, otherwise - false
bufferSizeintThe minimum size of the buffer in bytes

StreamReader::StreamReader(const System::String&) constructor

Constructs an instance of StreamReader object that reads characters from the specified file using UTF-8 encoding and a buffer with default size of 4096 bytes.

System::IO::StreamReader::StreamReader(const System::String &path)

Arguments

ParameterTypeDescription
pathconst System::String&The path of the file to read characters from

StreamReader::StreamReader(const System::String&, bool) constructor

Constructs an instance of StreamReader object that reads characters from the specified file using UTF-8 encoding and a buffer with default size of 4096 bytes. A parameter specifies if byte order mark detection should be enabled.

System::IO::StreamReader::StreamReader(const System::String &path, bool detectEncodingFromByteOrderMarks)

Arguments

ParameterTypeDescription
pathconst System::String&The path of the file to read characters from
detectEncodingFromByteOrderMarksboolTrue to look for byte order marks at the beginning of the file, otherwise - false

StreamReader::StreamReader(const System::String&, const EncodingPtr&) constructor

Constructs an instance of StreamReader object that reads characters from the specified file using the specified encoding and a buffer with default size of 4096 bytes.

System::IO::StreamReader::StreamReader(const System::String &path, const EncodingPtr &encoding)

Arguments

ParameterTypeDescription
pathconst System::String&The path of the file to read characters from
encodingconst EncodingPtr&The encoding to use

StreamReader::StreamReader(const System::String&, const EncodingPtr&, bool) constructor

Constructs an instance of StreamReader object that reads characters from the specified underlying stream using the specified encoding and a buffer with default size of 4096 bytes. A parameter specifies if byte order mark detection should be enabled.

System::IO::StreamReader::StreamReader(const System::String &path, const EncodingPtr &encoding, bool detectEncodingFromByteOrderMarks)

Arguments

ParameterTypeDescription
pathconst System::String&The path of the file to read characters from
encodingconst EncodingPtr&The encoding to use
detectEncodingFromByteOrderMarksboolTrue to look for byte order marks at the beginning of the file, otherwise - false

StreamReader::StreamReader(const System::String&, const EncodingPtr&, bool, int) constructor

Constructs an instance of StreamReader object that reads characters from the specified file using the specified encoding and a buffer of the specified size. A parameter specifies if byte order mark detection should be enabled.

System::IO::StreamReader::StreamReader(const System::String &path, const EncodingPtr &encoding, bool detectEncodingFromByteOrderMarks, int bufferSize)

Arguments

ParameterTypeDescription
pathconst System::String&The path of the file to read characters from
encodingconst EncodingPtr&The encoding to use
detectEncodingFromByteOrderMarksboolTrue to look for byte order marks at the beginning of the file, otherwise - false
bufferSizeintThe minimum size of the buffer in bytes

See Also