Indy 9 | Content | Index | Reference

TIdEncoderQuotedPrintable
Hierarchy, Properties, Methods, See Also, Unit: IdCoderQuotedPrintable
Implements an encoder for the Quoted-Printable encoding scheme.

    TIdEncoderQuotedPrintable = class(TIdEncoder)

Unit
IdCoderQuotedPrintable
Description
TIdEncoderQuotedPrintable is a TIdEncoder descendant that implements the encoding algorithm for the Quoted-Printable encoding scheme. TIdEncoderQuotedPrintable will convert values in the manner described in the Internet Standards document:

- RFC 2045 - Multipurpose Internet Mail Extensions (MIME), Part One: Format of Internet Message Bodies, Section 6.7 Quoted-Printable Content Transfer Encoding (http://www.rfc-editor.org/rfc/rfc2045.txt)

Use TIdDecoderQuotedPrintable to return QUoted-Printable values to their un-encoded state.

TIdEncoderQuotedPrintable.Encode
TIdEncoderQuotedPrintable, See Also
Encodes values in a stream using the Quoted-Printable encoding scheme.

    function Encode(ASrcStream: TStream; const ABytes: integer = MaxInt): string; override;

Parameters
ASrcStream: TStream
Stream containing values to be encoded.
const ABytes: integer = MaxInt
Number of Bytes in the input Stream to be encoded.
Return Value
String - Quoted-Printable representation of values in the input stream.
Description
Encode is an overridden String function in TIdEncoderQuotedPrintable that implements the encoding algorithm for the Quoted-Printable encoding scheme as described in RFC 2045.

ASrcStream is a TStream descendant that contains the un-encoded values to be used in the encoding operation. When ASrcStream has a size of 0, no operation is performed by the Encode method.

ABytes is the number of Bytes in ASrcStream to be affected by the Encode method. If ABytes is smaller than ASrcStream.Size, only ABytes characters in the stream will be used for the encoding operation.

Encode uses an 8K buffer to read values from ASrcStream for the encoding algorithm. Note: Encode does not reset the position of ASrcStream before or after encoding operations.

Use TIdDecoderPrintable.DecodeToStream to convert the return value from Encode to their un-encoded state.

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