Getting infos about a MIME type
What a MIME type can be
Using MIME_Type you can get different data about a MIME type. All methods mentioned here can be called statically.
-
getMedia() returns the main part (media part, portion before the slash) of a MIME type. It would return
image
forimage/png
. -
getSubType() returns the subtype of the given type. For
image/png
, it returnspng
. -
isExperimental() checks if a given MIME type is experimental. It returns
true
orfalse
(e.g.text/x-vcard
). -
isVendor() determines if the given type is a vendor specific MIME type (e.g. as in
application/vnd.mozilla.xul+xml
). -
isWildcard() tells you if the passed type is a wildcard type (is either
*/*
orsomething/*
).