[Overview][Constants][Classes] Reference for unit 'bufstream' (#fcl)

TBufStream.Create

Create a new TBufStreaminstance.

Declaration

Source position: line 0

public constructor TBufStream.Create(

  ASource: TStream;

  ACapacity: Integer

);

constructor TBufStream.Create(

  ASource: TStream

);

Description

Createcreates a new TBufStreaminstance. A buffer of size ACapacityis allocated, and the ASourcesource (or destination) stream is stored. If no capacity is specified, then DefaultBufferCapacityis used as the capacity.

An instance of TBufStreamshould never be instantiated directly. Instead, an instance of TReadBufStreamor TWriteBufStreamshould be created.

Errors

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

See also

TBufStream.Destroy

  

Destroys the TBufStreaminstance

TReadBufStream

  

Read-only buffered stream.

TWriteBufStream

  

Write-only buffered stream.