Internet Direct (Indy) Version 9.0.2 Beta
TIdMessageDecoderUUE.ReadBody
Implements reading and decoding the body of an RFC 822 message part using the UUDecode algorithm.

function ReadBody(ADestStream: TStream; var AMsgEnd: Boolean): TIdMessageDecoder; override;
Parameters
ADestStream: TStream
Stream to receive the decoded contents of the message part.

var AMsgEnd: Boolean
Returns
TIdMessageDecoder - Message decoder class used for the message part.

Description
ReadBody is an overridden TIdMessageDecoder function in TIdMessageDecoderUUE that implements reading and decoding of an RFC 822 message part using the UUDecode algorithm. ReadBody constructs an internal decoder class, either TIdDecoderUUE or TIdDecoderXXE, based on the value of the length byte in the encoded body line. If the body line does not contain a value expected for UUE- or XXE-encoded lines, an EIdException will be raised with the constant message RSUnrecognizedUUEEncodingScheme.

ReadBody calls ReadLn until the end of the encoded message stream is reached. Each line read from the input stream is processed using the DecodeToStream method for the decoder class instance.