Topic Path: Symbol Reference > Classes > TIdEncoderMIME Class
ContentsIndexHome
PreviousUpNext
TIdEncoderMIME Class

Implements an encoder for MIME content using the Base64 encoding scheme.

File
TIdEncoderMIME = class(TIdEncoder3to4);

TIdEncoderMIME is a TIdEncoder3to4 descendant that implements an encoder for MIME content encoded using the Base64 encoding algorithm. TIdEncoderMIME enhances the ancestor class by overriding the protected InitComponent method to perform initalization that allow the encoder to utilize the Base64 alphabet identified in GBase64CodeTable and the special padding character "=" in the FillChar property.

[Delphi] Encoding data in a string. 

 

  var
    AEnc: TIdEncoderMime;
    sInput: String;
    sEncOutput: String;

  ...

  AEnc := TIdEncoderMIME.Create(Nil);
  sEncOutput := AEnc.Encode(sInput);
  AEnc.Free;

 

[Delphi] Encoding stream-based data. 

 

  var
    AEnc: TIdEncoderMime;
    AStream: TIdStream;
    sEncOutput: String;

  ...

  AEnc := TIdEncoderMIME.Create(Nil);
  sEncOutput := AEnc.Encode(AStream, AStream.Size);
  AEnc.Free;
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.