Sign in Join
FPDoc Onlineexperiment

TMemoryStream.Write procedure

Member of TMemoryStreamIn unit Objects

Write data to the stream.

Declaration

pascal
procedure Write(var Buf; Count: LongInt); virtual

Description

Write copies Count bytes from Buf to the stream. It updates the position of the stream.

If not enough memory is available to hold the extra Count bytes, then the stream will try to expand, by allocating as much blocks with size BlkSize (as specified in the constructor call Init) as needed.

For an example, see Read.

Errors

If the stream cannot allocate more memory, then the status is set to stWriteError

See also

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