Sign in Join
FPDoc Onlineexperiment

TBufStream.Create constructor

Member of TBufStreampublicIn unit BufStream

Create a new TBufStream instance.

Declaration

pascal
constructor Create(ASource: TStream; ACapacity: Integer)
constructor Create(ASource: TStream)

Arguments

ASource

Source stream to buffer data from.

ACapacity

Buffer capacity.

Description

Create creates a new TBufStream instance. A buffer of size ACapacity is allocated, and the ASource source (or destination) stream is stored. If no capacity is specified, then DefaultBufferCapacity is used as the capacity.

An instance of TBufStream should never be instantiated directly. Instead, an instance of TReadBufStream or TWriteBufStream should be created.

Errors

If not enough memory is available for the buffer, then an exception may be raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.