Indy 9 | Content | Index | Reference

TIdMessageEncoderUUEBase
Hierarchy, Properties, Methods, Events, See Also, Unit: IdMessageCoderUUE
Implements the UUEncode algorithm for an RFC 822 message part.

    TIdMessageEncoderUUEBase = class(TIdMessageEncoder)

Unit
IdMessageCoderUUE
Description
TIdMessageEncoderUUEBase is a TIdMessageEncoder descendant that is a base class implementing support for encoding an RFC 822 message part using the UUEncode algorithm. TIdMessageEncoderUUEBase extends the ancestor class by overriding the Encode method to allow creation of the entire encoded packet using a TIdEncoder3to4 object instance.

TIdMessageEncoderUUEBase.Encode
TIdMessageEncoderUUEBase, See Also
Implement encoding of a message part using a 3-byte to 4-byte encoding algorithm.

    procedure Encode(ASrc: TStream; ADest: TStream); override;

Parameters
ASrc: TStream
Stream containing the message part to be encoded.
ADest: TStream
Stream to receive the encoded message part.
Description
Encode is an overridden procedure in TIdMessageEncoderUUEBase that extends the ancestor class by implementing encoding of an RFC 822 message part using a 3-byte to 4-byte encoding algorithm.

Encode uses an instance of the TIdEncoder3to4 object to perform encoding of the values in the ASrc input stream, and writes the encoded message part to the ADest output stream.

Encode constructs the entire UUEncode packet including the header, body, and trailer sections. The header section includes the keyword "begin" followed by the space-delimited values for PermissionCode, Filename, and the EOL character sequence. The body section consists of one or more lines containing the encoded output form the TIdEncoder3to4 object. Each line will contain not more than 45 bytes and the EOL character sequence. The trailer section contains the FillChar value followed by EOL, the keyword "end", and an additional EOL character sequence.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.