Internet Direct (Indy)
Home
PreviousUpNext
TIdEncoder.Encode Method (TIdStream, Integer)

Specifies the method used for encoding stream-based input values.

Pascal
function Encode(
    ASrcStream: TIdStream; 
    const ABytes: Integer = MaxInt
): string; virtual; abstract; overload;
Parameters 
Description 
ASrcStream 
Stream-based values to be encoded.
 
ABytes 
Number of bytes in the input stream to be encoded. Default value is MaxInt. 

string - Encoded value for the input parameter(s).

Encode is an overloaded abstract virtual String function in TIdEncoder, and specifies the method used for encoding Stream-based input values. 

ASrcStream is the stream containing the un-encoded values to be encoded in the method. 

ABytes indicates the number of bytes in ASrcStream to be affected by the encoding operation. When omitted, ABytes defaults to the constant value MaxInt, and allows the method to read up to MaxInt byte values or until the end of the Stream is reached. 

The stream-based Encode method must be overridden and implemented in a descendant class using the specific encoding algorithm for the implementation. 

Use the overloaded string-based variant of the Encode method to perform encoding for values specified in a string data type. 

Use the Decode method in TIdDecoder to reverse the encoding performed using the Encode method.

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.