MimeTypeUtils

Constructors

this
this()

Constructor.

Members

Functions

addMimeMapping
void addMimeMapping(string extension, string type)

Set a mime mapping

getMimeByExtension
string getMimeByExtension(string filename)

Get the MIME type by filename extension. Lookup the content and static default mime maps.

getMimeMap
Map!(string, string) getMimeMap()
Undocumented in source. Be warned that the author may not have intended to support it.
setMimeMap
void setMimeMap(Map!(string, string) mimeMap)

@param mimeMap A Map of file extension to mime-type.

Manifest constants

EncodingProperties
enum EncodingProperties;
Undocumented in source.
MimeProperties
enum MimeProperties;
Undocumented in source.

Static functions

addEncoding
void addEncoding(string encoding)
Undocumented in source. Be warned that the author may not have intended to support it.
getAcceptMIMETypes
List!string getAcceptMIMETypes(string accept)
Undocumented in source. Be warned that the author may not have intended to support it.
getAssumedEncodings
Map!(string, string) getAssumedEncodings()

Access a mutable map of mime type to the charset assumed for that content type. An assumed encoding is used by when encoding/decoding a stream, but is not explicitly set in any metadata (eg Content-MimeType).

getCharsetAssumedFromContentType
string getCharsetAssumedFromContentType(string contentType)
Undocumented in source. Be warned that the author may not have intended to support it.
getCharsetFromContentType
string getCharsetFromContentType(string value)
Undocumented in source. Be warned that the author may not have intended to support it.
getCharsetInferredFromContentType
string getCharsetInferredFromContentType(string contentType)
Undocumented in source. Be warned that the author may not have intended to support it.
getContentTypeMIMEType
string getContentTypeMIMEType(string contentType)
Undocumented in source. Be warned that the author may not have intended to support it.
getContentTypeWithoutCharset
string getContentTypeWithoutCharset(string value)
Undocumented in source. Be warned that the author may not have intended to support it.
getDefaultMimeByExtension
string getDefaultMimeByExtension(string filename)

Get the MIME type by filename extension. Lookup only the static default mime map.

getInferredEncodings
Map!(string, string) getInferredEncodings()

Access a mutable map of mime type to the charset inferred from that content type. An inferred encoding is used by when encoding/decoding a stream and is explicitly set in any metadata (eg Content-MimeType).

getKnownMimeTypes
Set!string getKnownMimeTypes()
Undocumented in source. Be warned that the author may not have intended to support it.
parseAcceptMIMETypes
AcceptMimeType[] parseAcceptMIMETypes(string accept)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

CACHE
MimeType[string] CACHE;
Undocumented in source.

Meta