Converts the data type to a TIdBytes value.
function ToBytes( const AValue: string; const AEncoding: TIdEncoding = enANSI ): TIdBytes; overload;
Parameters |
Description |
AValue |
Value to be converted to TIdBytes. |
AEncoding |
CHaracter set encoding for values in the array of bytes. |
TIdBytes - Results of the data type conversion.
ToBytes is an overloaded TIdBytes function used to convert the data type in AValue to the return value for the function.
ToBytes is a utility function used internally in the Indy library, and isolates the platform-specific requirements for working with Delphi string and .Net array of Byte data types.
For the .Net platform, the AnsiEncoding.GetBytes method from the framework is used to store the converted values.
For all other platforms, the Move procedure from the runtime library is used to store the converted values.
TIdIOHandler.WriteBytes
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. |