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

TBufStream.Create

Create a new TBufStream instance.

Declaration

Source position: bufstream.pp line 47

public constructor TBufStream.Create(

  ASource: TStream;

  ACapacity: Integer

);

constructor TBufStream.Create(

  ASource: TStream

);

Arguments

ASource

  

Source stream to buffer data from

ACapacity

  

Buffer capacity

Arguments

ASource

  

Source stream to buffer data from

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

TBufStream.Destroy

  

Destroys the TBufStream instance

TReadBufStream

  

Read-only buffered stream.

TWriteBufStream

  

Write-only buffered stream.


Documentation generated on: Nov 14 2015