Internet Direct (Indy)
Home
PreviousUpNext
TIdBaseStream.Read Method (array of Byte, Longint, Longint)

Implements read operations using the platform-specific stream implementation.

Pascal
function Read(
    var VBuffer: array of Byte; 
    AOffset: Longint; 
    ACount: Longint
): Longint; override;
Parameters 
Description 
Buffer 
Destination for values from the read operation.
 
Offset 
Position in the stream to begin 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.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.