mime library

Help for working with file format identifiers such as text/html and image/png.

More details, including a list of types, are in the Wikipedia article Internet media type.

Classes

MimeMultipart
A Mime Multipart class representing each part parsed by MimeMultipartTransformer. The data is streamed in as it become available.
MimeMultipartTransformer
Parser for MIME multipart types of data as described in RFC 2046 section 5.1.1. The data is transformed into MimeMultipart objects, each of them streaming the multipart data.
MimeTypeResolver
MIME-type resolver class, used to customize the lookup of mime-types.

Properties

defaultMagicNumbersMaxLength int
The maximum number of bytes needed, to match all default magic-numbers.
no setter

Functions

extensionFromMime(String mime) String
Returns the extension for the given MIME type.
lookupMimeType(String path, {List<int>? headerBytes}) String?
Extract the extension from path and use that for MIME-type lookup, using the default extension map.

Exceptions / Errors

MimeMultipartException