System.Classes.TStreamWriter.Create

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

constructor Create(Stream: TStream); overload;
constructor Create(Stream: TStream; Encoding: TEncoding; BufferSize: Integer = 4096); overload;
constructor Create(const Filename: string; Append: Boolean = False); overload;
constructor Create(const Filename: string; Append: Boolean; Encoding: TEncoding; BufferSize: Integer = 4096); overload;

C++

__fastcall TStreamWriter(TStream* Stream)/* overload */;
__fastcall TStreamWriter(TStream* Stream, System::Sysutils::TEncoding* Encoding, int BufferSize)/* overload */;
__fastcall TStreamWriter(const System::UnicodeString Filename, bool Append)/* overload */;
__fastcall TStreamWriter(const System::UnicodeString Filename, bool Append, System::Sysutils::TEncoding* Encoding, int BufferSize)/* overload */;

Properties

Type Visibility Source Unit Parent
constructor public
System.Classes.pas
System.Classes.hpp
System.Classes TStreamWriter

Description

Create TStreamWriter instance.

This method creates and initializes a TStreamWriter instance.

If you call this creator with a filename (<Filename>), the resulting instance of TStreamWriter takes ownership of the specified file. However, if you call this creator with an instance of TStream (<Stream>), the resulting instance of TStreamWriter does not take ownership of this instance of TStream by default. After you create an instance of TStreamWriter, you can call TStreamWriter.OwnStream to make TStreamWriter take ownership of its stream.

See Also

Code Examples