System.Classes.TStreamReader.Create

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

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

C++

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

Properties

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

Description

Create TStreamReader instance.

This method creates and initializes a TStreamReader instance.

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

See Also

Code Examples