Indy 9
|
TIdMessageEncoderMIME = class(TIdMessageEncoder)
procedure Encode(ASrc: TStream; ADest: TStream); override;
ASrc is a TStream descendant that contains the un-encoded data for the message part. Encode positions the stream to its origin before the encoding algorithm is used to convert the data in ASrc.
ADest is a TStream descendant that will be used to receive the encoded data for the message part.
Encode uses an instance of TIdEncoderMIME to perform the physical encoding of data using the Base64 algorithm. Encode calls TIdEncoderMIME.Encode using 57 characters from ASrc per call. 57 characters is the maximum number of un-encoded data bytes that can be represented in the 72 character Base64-encoded line after applying the 3-byte to 4-byte encoding algorithm. All encoded data is written to the TStream descendant ADest.