Java Desktop System Release 3 Administration Guide

Adding a MIME Type to the MIME Database

To add a new MIME type to the database, an application must install a MIME type description file. A MIME type description file is an XML file that associates MIME types with file content sniffer information, and with file extensions and filename patterns.

The following is a sample MIME type description file:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns=''>
	<mime-type type="image/png">
		<comment>PNG image</comment>
		<comment xml:lang="de">PNG-Grafik</comment>
		<magic priority="50>
			<match offset="0" type="string" value="\x89PNG" />
		<glob pattern="*.png" />

The elements in a MIME type description file are similar to the elements in the MIME database. For information about the elements in a MIME type description file, see Structure of the MIME Database.

After the application installs the MIME type description file, the application must execute the update-mime-database command to update the MIME database.