MailCodec class abstract

Encodes and decodes base-64 and quoted printable encoded texts

Compare https://tools.ietf.org/html/rfc2045#page-19 and https://tools.ietf.org/html/rfc2045#page-23 for details

Implementers

Constructors

MailCodec()
Creates a new mail codec
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

decodeData(String part) → Uint8List
Encodes the given part text.
decodeText(String part, Encoding codec, {bool isHeader = false}) → String
Decodes the given part text with the given codec.
encodeHeader(String text, {bool fromStart = false}) → String
Encodes the header text in the chosen codec's only if required.
encodeText(String text, {Codec codec = encodingUtf8, bool wrap = true}) → String
Encodes the specified text in the chosen codec's format.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

decode8BitTextData(String part) → Uint8List
Decodes the data from the given 8bit text part
decodeAnyText(String text, String? transferEncoding, String? charset) → String
Decodes the given text
decodeAsText(Uint8List data, String? transferEncoding, String? charset) → String
Decodes the given data
decodeBinary(String text, String? transferEncoding) → Uint8List
Decodes the given binary text
decodeBinaryTextData(String part) → Uint8List
Decodes binary from the given text part.
decodeHeader(String? input) → String?
Decodes the given header input value.
decodeOnlyCodec(String part, Encoding codec, {bool isHeader = false}) → String
Is a noop
detectHeaderEncoding(String value) → HeaderEncoding
Detects the encoding used in the given header value.
wrapText(String text, {bool wrapAtWordBoundary = false}) → String
Wraps the text so that it stays within email's 76 characters per line convention.

Constants

base64 → const Base64MailCodec
bas64 mail codec
contentTransferEncodingNone → const String
No transfer encoding
encodingAscii → const AsciiCodec
ASCII encoding
encodingLatin1 → const Latin1Codec
ISO-8859-1 encoding
encodingUtf8 → const Utf8Codec
UTF8 encoding
quotedPrintable → const QuotedPrintableMailCodec
quoted printable mail codec