Sign in Join
FPDoc Onlineexperiment

TWindowedStream.Read function

Member of TWindowedStreampublicIn unit StreamEx

Read data from the stream.

Declaration

pascal
function Read(var aBuffer; aCount: LongInt): LongInt; override

Arguments

aBuffer

Buffer into which to read the data.

aCount

Maximum number of bytes to be read.

Function result

Number of read bytes.

Description

Read attempts to read data from the stream. It will attempt to restore the source stream position if it was changed since the last read, write or seek operation. It then attempts to read ACount bytes from the source stream into ABuffer and returns the number of actually read bytes. TWindowedStream.Read will only read as much data as the window allows, even if the source stream has more data available.

See also

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