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

Implements write operations using the platform-specific stream implementation.

function Write(
    const ABuffer; 
    ACount: Longint
): Longint; override;
Parameters 
Description 
Buffer 
Values to be written to the stream.
 
Count 
Number of byte values to be written to the stream. 

Longint - Number of bytes written in the write operation.

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

 

On the .Net platform, Write uses an array of Byte to represent the Buffer containing values written to the stream. 

 

On all other platforms, Write uses an untyped pointer to represent the Buffer containing values written to the stream. Write calls the Move procedure from the Runtime library to update the stream Buffer with the output values. 

Use Read to input values using 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.