MimeTypeResolver class

MIME-type resolver class, used to customize the lookup of mime-types.

Constructors

MimeTypeResolver()
Create a new MimeTypeResolver containing the default scope.
MimeTypeResolver.empty()
Create a new empty MimeTypeResolver.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
magicNumbersMaxLength int
Get the maximum number of bytes required to match all magic numbers, when performing lookup with headerBytes present.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addExtension(String extension, String mimeType) → void
Add a new MIME-type mapping to the MimeTypeResolver. If the extension is already present in the MimeTypeResolver, it'll be overwritten.
addMagicNumber(List<int> bytes, String mimeType, {List<int> mask}) → void
Add a new magic-number mapping to the MimeTypeResolver. [...]
lookup(String path, {List<int> headerBytes}) String
Extract the extension from path and use that for MIME-type lookup. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited