Indy 9
TIdDecoderUUE
Hierarchy, Properties, Methods, See Also, Unit: IdCoderUUE
Implements a decoder for data encoded using the UUEncode algorithm and the UUEncode alphabet.
TIdDecoderUUE = class(TIdDecoderUUEBase)
Unit
IdCoderUUE
Description
TIdDecoderUUE is a TIdDecoderUUEBase descendant that implements a decoder for data encoded using the UUEncode algorithm. TIdDecoderUUE provides facilities for decoding the 7-bit US-ASCII representation of encoded data into it's original binary format. TIdDecoderUUE also specifies the decoding table for the UUEncode alpahabet in GUUEDecodeTable, and the default FillChar '~'.

TIdDecoderUUE uses the 4-byte to 3-byte decoding algorithm defined in TIdDecoderUUEBase. TIdDecoderUUEBase handles the UUEncode body line format, which consists of the encoded length followed by the encoded data.

TIdDecoderUUE is used by other Indy coder classes, such as TIdMessageDecoderUUE, that handle UUEncode message streams in RFC 822-compliant mail messages.


TIdDecoderUUE.Create
TIdDecoderUUE, See Also
Constructor for the object instance.
constructor Create(AOwner: TComponent); override;
Parameters
AOwner: TComponent
Owner of the object instance.
Description
Create is the constructor for the TIdDecoderUUE object instance, and relies on the inherited constructor. Create also initializes the decoder table for the UUEncode algorithm to GUUEDecodeTable. Create also sets the default FillChar value to '~'.

TIdDecoderUUE.DecodeToStream
TIdDecoderUUE, See Also
Converts a UUEncoded body line to it's original binary format.
procedure DecodeToStream(AIn: string; ADest: TStream); override;
Parameters
AIn: string
Values to decoded.
ADest: TStream
Destination for decoded values.
Description
DecodeToStream is an overridden Procedure in TIdDecoderUUE that re-implements the inherited method to provide support for reading the UUEncode body line format, as well as the specifics of the UUDecode algorithm using the modified UUEncode alphabet.

AIn contains the UUEncoded input values that will be restored to their original binary format.

ADest is a TStream descendant that will receive the results of the decoding algorithm.

DecodeToStream modifies all AIn by replacing all instances of the SPace character (Decimal 32) in the encoded values with the '`' character (Decimal 96) to support older versions of UUEncode which used the space character in the UUEncode alphabet. DecodeToStream calls the inherited DecodeToStream method using the modified AIn value to perform the UUDecode algorithm.


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