help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

TBufStream.Create

Create a new TBufStream instance.

Declaration

Source position: line 0

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.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505