Getting infos about a MIME type

Getting infos about a MIME type – How to get more information 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 for image/png.

  • getSubType() returns the subtype of the given type. For image/png, it returns png.

  • isExperimental() checks if a given MIME type is experimental. It returns true or false (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 */* or something/*).

How to determine the MIME type of a file (Previous) How to change things (Next)
Last updated: Mon, 20 Oct 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.