Topic Path: Symbol Reference > Classes > TIdBaseStream Class > TIdBaseStream Methods > Read Method > Read Method (, Longint)
ContentsIndexHome
PreviousUpNext
TIdBaseStream.Read Method (, Longint)

Implements read operations using the platform-specific stream implementation.

function Read(
    var VBuffer; 
    ACount: Longint
): Longint; override;
Parameters 
Description 
Buffer 
Destination for values from the read operation.
 
Count 
Number of bytes to be read from the stream. 

Longint - Number of bytes actually read in the operation.

Read is an overridden Longint method that isolates the platform-specific stream methods required to implement read operations. Read relies on the method implementation in a descendant classes for the protected virtual abstract IdRead method. 

 

On the .Net platform, Read uses an array of Byte to represent the Buffer for storing values read from the stream. 

 

On all other platforms, Read uses an untyped pointer to represent the Buffer for storing values read from the stream. Read calls the Move procedure from the Runtime library to update Buffer with the read values. 

Use Write to output values to a platform-specific stream implementation. 

Use Seek to reposition a platform-specific stream implementation.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.