Topic Path: Symbol Reference > Classes > TIdBuffer Class > TIdBuffer Methods > Write Method > Write Method (Byte, Integer)
ContentsIndexHome
PreviousUpNext
TIdBuffer.Write Method (Byte, Integer)

Adds data to the internal storage for the Indy buffer.

procedure Write(
    const AValue: Byte; 
    const ADestIndex: Integer = -1
); overload;
Parameters 
Description 
AValue 
Value to store in the buffer.
 
ADestIndex 
Initial postion in the buffer where the value is stored. Default value is -1. 

Write is an overloaded method used to add one or more values representing the ordinal data type in AValue to the internal storage for the buffer. 

AValue is the ordinal data type with byte values to store in the buffer. 

ADestIndex marks the initial postion in the buffer where bytes representing the value are stored. The default value is -1, and indicates that bytes should be appended to any existing content in the internal storage for the buffer. When ADestIndex contains a zero or a positive value, bytes represent the ordinal data type are stored beginning at the postion indicated. Please note that any existing content in the buffer would be overwritten. 

Write stores the byte value from AValue at the required position, and adjusts the Size property to reflect the increased storage required for the buffer.

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