System::IO::StreamWriter::StreamWriter constructor

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

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

System::IO::StreamWriter::StreamWriter(const SharedPtr<Stream> &stream)
ParameterTypeDescription
streamconst SharedPtr<Stream>&The underlying stream to write characters to

See Also

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

Constructs an instance of StreamWriter object that writes characters to the specified underlying stream using the specified encoding and a buffer with default size of 1024 bytes.

System::IO::StreamWriter::StreamWriter(const SharedPtr<Stream> &stream, const EncodingPtr &encoding)
ParameterTypeDescription
streamconst SharedPtr<Stream>&The underlying stream to write characters to
encodingconst EncodingPtr&The encoding to use

See Also

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

Constructs an instance of StreamWriter object that writes characters to the specified underlying stream using the specified encoding and a buffer of the specified size. A parameter specifies whether the underlying stream should be closed when the StreamWriter object is disposed.

System::IO::StreamWriter::StreamWriter(const SharedPtr<Stream> &stream, const EncodingPtr &encoding, int buffer_size, bool leave_open=false)
ParameterTypeDescription
streamconst SharedPtr<Stream>&The underlying stream to write characters to
encodingconst EncodingPtr&The encoding to use
buffer_sizeintThe minimum size of the buffer in bytes
leave_openboolSpecifies whether the underlying stream should be left open after the current StreamWriter object is disposed

See Also

StreamWriter::StreamWriter(const String&) constructor

Constructs an instance of StreamWriter object that writes characters to the specified file using UTF-8 encoding and a buffer with default size of 1024 bytes.

System::IO::StreamWriter::StreamWriter(const String &path)
ParameterTypeDescription
pathconst String&The path of the file to write characters to

See Also

StreamWriter::StreamWriter(const String&, bool, const EncodingPtr&, int) constructor

Constructs an instance of StreamWriter object that writes characters to the specified file using the specified encoding and buffer size. A parameter specifies whether the data should be appened to the file or the file should be overwritten.

System::IO::StreamWriter::StreamWriter(const String &path, bool append, const EncodingPtr &encoding, int buffer_size)
ParameterTypeDescription
pathconst String&The path of the file to write characters to
appendboolSpecifies whether the data should be appended to the specified file (true) or the file should be overwritten (false)
encodingconst EncodingPtr&The encoding to use
buffer_sizeintThe size of buffer to use

See Also

StreamWriter::StreamWriter(const String&, bool, const EncodingPtr&) constructor

Constructs an instance of StreamWriter object that writes characters to the specified file using the specified encoding and a buffer with default size of 1024 bytes. A parameter specifies whether the data should be appened to the file or the file should be overwritten.

System::IO::StreamWriter::StreamWriter(const String &path, bool append, const EncodingPtr &encoding=System::Text::Encoding::get_UTF8Unmarked())
ParameterTypeDescription
pathconst String&The path of the file to write characters to
appendboolSpecifies whether the data should be appended to the specified file (true) or the file should be overwritten (false)
encodingconst EncodingPtr&The encoding to use

See Also