TStreamReader.Create constructor
Create a new instance of
TStreamReader from a stream.
Declaration
constructor Create(AStream: TStream; ABufferSize: Integer;
AOwnsStream: Boolean); virtual
constructor Create(AStream: TStream); virtual
constructor Create(const aFilename: string)
constructor Create(const aFilename: string; aDetectBOM: Boolean)
constructor Create(const aFilename: string; aEncoding: TEncoding;
aDetectBOM: Boolean; aBufferSize: Integer); overloadArguments
AStream | Stream to use as source of text data. |
ABufferSize | Buffer size to use for read buffer. |
AOwnsStream | Should the stream be freed when the textreader is freed. |
aFilename | |
aDetectBOM | |
aEncoding |
Description
Create initializes a
TStreamReader using the provided
AStream.
It will allocate a buffer of
ABufferSize bytes for faster reading of data.
If no buffer size is specified,
BUFFER_SIZE will be used.
If the
ABufferSize argument is less than
MIN_BUFFER_SIZE, then
MIN_BUFFER_SIZE bytes will be used.
If AOwnsStream is true, the stream will be freed when the TStreamReader instance is freed.
If omitted, its value is assumed to be False.
Errors
If
AStream is
Nil, an
EArgumentException
exception will be raised.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
