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

Adds data to the internal storage for the Indy buffer.

procedure Write(
    const AString: string; 
    AEncoding: TIdEncoding = enDefault; 
    const ADestIndex: Integer = -1
); overload;
Parameters 
Description 
AString 
Values to be added to the Indy buffer.
 
AEncoding 
Optional encoding for values written to the buffer. Default value is enDefault.
 
ADestIndex 
Position to begin storing values in the buffer. Default value is -1. 

Write is an overloaded procedure used to include the values specified in AString in any existing data in the internal storage for the Indy buffer. 

AEncoding indicates the encoding to use when writing the byte values in AString to the position specified. 

ADestIndex indicates the starting position where encoded bytes values will be stored in the buffer. The default value (-1) indicates encoded byte values are appended to the end of existing data in the buffer. 

Write checks the size of the internal storage for the buffer to ensure that writing the requested number of Bytes will not result in an internal storage area too large for the host platform or operating system.

Exceptions 
Description 
With RSTooMuchDataInBuffer when the requested number of bytes will result in an internal storage area too large for the host platform or operating system. 

Write 

ToBytes 

TIdEncoding

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