Internet Direct (Indy)
|
Stores a specific number of byte values into the internal storage for the buffer at a given position.
procedure Write( ABytes: TIdBytes; const ADestIndex: Integer = -1 ); overload;
Parameters |
Description |
ABytes |
Byte values to store in the buffer. |
ADestIndex |
Initial position in the buffer where byte values are stored. Default value is -1. |
Write is a procedure used to implement storing a specific number of byte values into the internal storage for the buffer.
ABytes is the TIdBytes data type containing the Byte values to store in the buffer.
ADestIndex indicates the initial position in the buffer where byte values are stored. The default value is -1, and indicates that unused storage space at the beginning of the buffer should be reclaimed prior to writing bytes from ABytes into the buffer. The allocated size of the buffer is not affected unless the Capacity and the Size are not large enough for the additional number of bytes indicated in ALength. Bytes values in ABytes are appended to any existing content in the buffer.
When ADestIndex contains zero or a positive value, existing byte values in the internal storage for the buffer are ignored. Values in ABytes are written to the position indicated in ADestIndex. Please note that the existing buffer content could be overwritten. The value in Size is adjusted to reflect the new length of the internal storage for the buffer.
Write calls the WriteLen method using the values in ABytes to update the contents of the internal storage for the buffer.
Use one of the overloaded Write methods to write a specific data type to the internal storage for the buffer.
Use one of the Extract methods to read a specific data type from the internal storage for the buffer:
Method |
Storage Data Type |
String | |
Byte | |
Cardinal | |
Int64 | |
Word |
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. |