MIME : Java Glossary
home M words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish 2008-02-01 by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
MIME MIME
Multipurpose Internet Mail Extension were a technique for describing and attaching files to Internet mail by converting raw binary files to printable ASCII. They have since been expanded for use in HTTP to describe the content of messages and downloads from to and from servers.

MimeCheck

This Applet will tell you what your server is sending for MIME types and what it should be. If you discover errors in the what it server is sending, notify the ISP. If you discover errors in what the MIME type should be, email me at email Roedy Green'.

You need Java to use MimeCheck.

MIME is also a way of specifying the format of web documents and attached email documents. The webserver gives two hints to the browser what sort of data it is sending it: the extension in the filename, and the MIME type in the HTTP header. The web server usually derives the MIME type by looking at a table of file extensions. If the web server fails to do this, often the file contents are just displayed as gibberish rather than properly acted on. In Novell Servers there is only one such extension-to-MIME translation table per server, not one per website hosted. Just send an email to your ISP telling them the extensions you need to support and the corresponding MIME types. In particular, you must tell your ISP to set up associations from extension to MIME type for all the Java file types such as .class, .java, .jar, .jnlp, .jardiff and .ser.

MIME types are referred to in the RFC 1945 HTTP 1.0 specification as media types. The content-type and content-encoding fields in the HTTP header together give a hint to the receiver what kind of data has just been handed to it.

IANA is responsible for assigning new MIME types. Unfortunately naming is even more chaotic than the extensions, often with several conflicting MIME types for each extension. Unfortunately, MIME has made the problem it was intended to solve even worse. It matters not what the official name is, but the MIME name configured in the majority of the world’s browsers is. I have found Filext.com the most useful source.

Common MIME Types
Extension MIME Type Alternate MIME Types Notes
123 application/vnd.lotus-1-2-3    
3dm x-world/x-3dmf    
3dmf x-world/x-3dmf    
3gp video/3gp   ok for video or audio
3gpp audio/3gp   audio only, also 3gp
7z application/x-7z-compressed    
aab application/x-authorware-bin    
aac audio/aac audio/MP4-LATM, audio/x-aac, audio/x-mp4 Apple QuickTime compressed audio used in iPods
aam application/x-authorware-map    
aas application/x-authorware-map    
adr application/x-msaddr    
afl video/animaflex    
ai application/postscript   Adobe PostScript
aif audio/x-aiff   MacIntosh sound
aifc audio/x-aiff   MacIntosh sound
aiff audio/x-aiff   MacIntosh uncompressed sound
alt application/x-up-alert    
aos application/x-nokia-9000-communicator-add-on-software    
arj application/x-arj    
asc text/plain   text
asd application/astound    
asf video/x-ms-asf   Microsoft media audio and/or video
asn application/astound    
asp application/x-asap    
asx video/x-ms-asf   Microsoft video
asz application/astound    
atom application/atom+xml    
au audio/basic audio/x-pn-au standard Unix/Internet/Java uncompressed wave sound
avi video/avi video/x-msvideo earlier Microsoft video format. avi movie, works with Winamp (best), MS Media Player (often audio only), or QuickTime (in theory)
axs application/olescript    
bas text/plain   Basic source
bat text/plain application/octet-stream DOS/Windows command line script
batfrag text/plain    
bcpio application/x-bcpio    
bild image/jpeg    
bin application/octet-stream application/x-macbinary executable program. You can use it for any file you want simply downloaded and as an intact binary. E.g. it would be useful for *.upd files in the Automatic File Update student project.
bmp image/bmp image/x-ms-bmp Windows image
btmfrag text/plain    
cacert application/x-x509-ca-cert    
ccs text/ccs    
cdf application/x-netcdf    
cdr application/x-cdr    
cer application/x-x509-ca-cert   X.509 Certificate
cgm image/cgm    
chat application/x-chat    
che application/x-up-cacheop    
chm application/chm   Windows compile help file format
cht audio/x-dspeech    
class application/octet-stream application/java, application/java-class, application/x-java-applet, application/x-java-vm compiled Java
clp image/x-clp    
cmd text/plain   Windows NT command line script
cmx image/x-cmx    
cnc application/x-cnc    
cod image/cis-cod    
coda application/x-coda    
com application/octet-stream   executable program. You can use it for any file you want simply downloaded and as an intact binary. E.g. it would be useful for *.upd files in the Automatic File Update student project.
con application/x-connector    
cpi image/cpi    
cpio application/x-cpio    
cpt application/mac-compactpro    
csh application/x-csh    
csm application/x-cu-seeme    
css text/css   Cascading Style Sheet.
cssfrag text/plain    
csv text/comma-separated-values   Microsoft’s format for import/export to Excel, Word and Access.
cu application/x-cu-seeme    
cut image/x-halo-cut    
dbf application/octet-stream    
dcr application/x-director    
dig multipart/mixed    
dir application/x-director    
djv image/vnd.djvu    
djvu image/vnd.djvu    
dll application/octet-stream    
dmg application/octet-stream    
dms application/octet-stream    
doc application/msword   Microsoft Word document formatted.
dsf image/x-mgx-dsf    
dss text/dss    
dst application/tajima    
dtd application/xml-dtd text/xml  
dus audio/x-dspeech    
dvi application/x-dvi    
dwf drawing/x-dwf    
dwg image/vnd    
dxf image/vnd    
dxr application/x-director    
ebk application/x-expandedbook    
ecert application/x-x509-email-cert    
email application/x-x509-email-cert    
emf image/x-emf    
eps application/postscript   Encapsulated Adobe PostScript
erf application/x-hsp-erf    
es audio/echospeech    
etf image/x-etf    
etx text/x-setext    
evy application/envoy application/x-envoy Envoy
exe application/octet-stream application/exe, application/x-msdos-download, application/x-msdownload, magnus-internal/cgi Windows executable program. Refered to as an application type in the associations editor.
ez application/andrew-inset    
fh4 image/x-freehand    
fh5 image/x-freehand    
fhc image/x-freehand    
fif image/fif    
flv video/x-flv   Flash video
fml application/fml    
fpx image/x-fpx    
frl application/freeloader    
fs application/X-FSRecipe    
gif image/gif   standard Internet icon image
gram application/srgs    
grxml application/srgs+xml    
gsd audio/gsm    
gsm audio/gsm    
gtar application/x-gtar    
gvi application/x-gsp   Google Video, copy protected.
gvp application/x-gsp   Google Video pointer
gz application/gzip application/x-gzip tar gzip
hdf application/x-hdf    
hdml text/x-hdml    
hlp application/octet-stream   Windows old-style help file format. See also chm. This is the MIME type Microsoft uses on its servers.
hqx application/mac-binhex40    
htm text/html   HTML, web browser
html text/html   HTML, web browser
htmlfrag text/plain    
ica application/x-ica   Citrix
ice x-conference/x-cooltalk    
ico image/x-icon    
ics text/calendar    
ief image/ief   image
ifb text/calendar    
iges model/iges    
igs model/iges    
ins application/x-NET-Install    
ips application/ips application/x-ipscript  
ipx application/x-ipix    
ivr i-world/i-vrml    
jad text/vnd.sun.j2me.app-descriptor   J2ME cell-phone or handheld application.
jar application/java-archive application/x-jar compiled compressed java plus data members.
jar.pack.gz application/x-java-pack200   jars super-compressed with pack200.exe
jardiff application/x-java-archive-diff   java jar update file, contains only jar members that have changed.
java text/x-java-source text/ plain java source code
javafrag text/plain    
jnlp application/x-java-jnlp-file   Java Web Start application descriptor XML file.
jnlpfrag text/plain    
jp2 image/jp2   lossless JPEG-2000
jpe image/jpeg image/pjpeg standard Internet photo image
jpeg image/jpeg image/pjpeg standard Internet photo image
jpg image/jpeg image/pjpeg standard Internet photo image
jps image/x-jps    
js application/x-javascript   JavaScript
kar audio/midi    
latex application/x-latex    
lha application/octet-stream    
lit application/lit    
lsp text/lsp    
lwp application/x-wordpro    
lzh application/octet-stream    
lzx application/octet-stream    
m3u audio/x-mpegurl    
m4a audio/mp4   M4A Audio
m4u video/vnd.mpegurl    
man application/x-troff-man    
map application/x-httpd-imap    
mathml application/mathml+xml    
mbd application/mbedlet    
mcf image/vasa    
mdb application/mdb    
me application/x-troff-me    
mesh model/mesh    
mfp application/mirage    
mid audio/x-midi audio/midi MIDI sound
midi audio/x-midi audio/midi MIDI sound
mif application/x-mif application/vnd.mif  
mol chemical/x-mdl-molfile    
mov video/quicktime   Quicktime movie player
movie video/x-sgi-movie   movie
mp2 audio/mpeg audio/x-mpeg  
mp3 audio/mp3 audio/mpeg, audio/x-mp3, audio/x-mpg mp3/mpeg compressed audio. Popular format for portable music players.
mp4 video/mp4    
mpe video/mpeg   mpeg movie player
mpeg video/mpeg   mpeg movie player
mpg video/mpeg   mpeg movie player
mpga audio/mpeg    
mpire application/x-mpire    
mpl application/x-mpire    
mpp application/vnd.ms-project    
ms application/x-troff-ms    
msh model/mesh    
msi application/msi application/x-msi Microsoft install files
msm application/msm    
mxu video/vnd.mpegurl    
n2p application/n2p    
nc application/x-netcdf    
npx application/x-netfpx    
nsc application/x-nschat    
oda application/oda    
ofml application/fml    
ogg audio/x-oggvorbis application/ogg encapsulation for Vorbis non-proprietary audio or video.
pac application/x-ns-proxy-autoconfig    
page application/x-coda    
pbd application/vnd.powerbuilder6    
pbm image/x-portable-bitmap   bitmap image
pdb chemical/x-pdb    
pdf application/pdf   Adobe Acrobat Portable Document Format
pfr application/font-tdpfr    
pgm image/x-portable-graymap   grayscale image
pgn application/x-chess-pgn    
pgp application/x-pgp-plugin   Pretty Good Privacy
pgr text/parsnegar-document    
php application/x-httpd-php    
php3 application/x-httpd-php3    
php4 application/x-httpd-php    
pls application/pls    
png image/png   Portal Network Graphics image
pnm image/x-portable-anymap    
pot application/mspowerpoint    
ppm image/x-portable-pixmap   pixel image
pps application/mspowerpoint    
ppt application/mspowerpoint application/vnd.ms-powerpoint  
ppz application/mspowerpoint    
pqf application/x-cprplayer    
pqi application/cprplayer    
ps application/postscript   Adobe PostScript
psr application/datawindow    
ptlk application/listenup    
push multipart/x-mixed-replace    
qd3 x-world/x-3dmf    
qd3d x-world/x-3dmf    
qrt application/quest    
qt video/quicktime   Quicktime movie player
qti image/x-quicktime    
qtl application/x-quicktimeplayer    
ra audio/x-pn-realaudio   Real Audio
ram audio/x-pn-realaudio   Real Audio
rar application/x-rar-compressed   Winrar compressed
ras image/x-cmu-raster    
rdf application/rdf+xml    
rgb image/x-rgb   image
rip image/rip    
rm audio/x-pn-realaudio application/vnd.rn-realmedia Real Audio
rmf audio/rmf audio/x-rmf  
rmm audio/x-pn-realaudio    
rms audio/x-realaudio-secure    
rng application/ringing-tones   Nokia phone ringtones. Also used for Relaxing.org schema files.
roff application/x-troff    
rpm audio/x-pn-realaudio-plugin   Real Audio
rrf application/x-InstallFromTheWeb    
rss application/rss+xml text/xml for RSS-2 podcasting feeds. Unfortunately, it does not distinguish between text, audio and video. RSS-1 uses application/xml or application/rdf+xml.
rtc application/rtc    
rtf application/rtf text/rtf rich text format
rtx text/richtext   rich text
sca application/x-supercard    
scert application/x-x509-server-cert    
scr application/octet-stream   Windows screensavers containing executable code. Beware! Frequently contain viruses.
seq application/octet-stream-bin    
ser application/x-java-serialized-object   Java serialised object
sgm text/sgml    
sgml text/sgml    
sh application/x-sh    
shar application/x-shar    
shtml text/x-server-parsed-html   server side includes; web server expands embedded commands. Sometimes htm and html files are parsed for embedded commands too.
shw application/presentations    
sig application/pgp-signature    
silo model/mesh    
sit application/x-stuffit    
sjf application/octet-stream    
skd application/x-koan    
skm application/x-koan    
skp application/x-koan    
skt application/x-koan    
smi application/smil    
smil application/smil    
sml application/smil    
smp application/studiom    
snd audio/basic   standard Internet/Java wave sound
so application/octet-stream    
spc text/x-speech    
spl application/futuresplash application/x-futuresplash  
spr application/x-sprite    
sprite application/x-sprite    
sql text/plain    
sqlfrag text/plain    
src application/x-wais-source    
ssi text/x-server-parsed-html   server side includes; web server expands embedded commands. Sometimes htm and html files are parsed for embedded commands too.
stk application/hstu    
stream audio/x-qt-stream    
sv4cpio application/x-sv4cpio    
sv4crc application/x-sv4crc    
svf image/vnd    
svg image/svg+xml    
svh image/svh    
svr x-world/x-svr    
swa application/x-director    
swf application/x-shockwave-flash   Shockwave Flash, not straight white female.
t application/x-troff    
talk application/talker    
tar application/x-tar   Unix tar archive
tbk application/toolbook    
tcl application/x-tcl    
tex application/x-tex    
texi application/x-texinfo    
texinfo application/x-texinfo    
text text/plain    
tgz application/gzip application/x-gzip tar gzip
tif image/tiff   bit map image
tiff image/tiff   bit map image
tlk application/x-tlk    
tmv application/x-Parable-Thing    
torrent application/x-bittorrent   BitTorrent
tr application/x-troff    
troff application/x-troff    
tsi audio/tsplayer    
tsp application/dsptype    
tsq application/timestamp-query   request to digitally sign and timestamp, usually a Jar digest. DER-base64 encoded.
tsr application/timestamp-reply   response from a CA to digitally sign and timestamp, usually a Jar digest. DER-base64 encoded.
tsv text/tab-separated-values   tab separated list
ttf font/ttf   TrueType font
txt text/plain    
u98 urdu/urdu98    
ucert application/x-x509-user-cert    
uin application/x-icq    
usercert application/x-x509-user-cert    
usr application/x-x509-user-cert   X.509 Certificate
ustar application/x-ustar    
vbd application/activexdocument    
vcd application/x-cdlink    
vcf text/x-vcard   vCard
vew application/groupwise   Novell GroupWise
vgm video/x-videogram    
vgp video/x-videogram-plugin    
vgx video/x-videogram    
viv video/vnd.vivo    
vivo video/vnd.vivo    
vmd application/vocaltec-media-desc    
vmf application/vocaltec-media-file    
vmi application/x-dreamcast-vms-info    
vms application/x-dreamcast-vms    
vox audio/voxware    
vpa application/vpa    
vqe audio/x-twinvq-plugin    
vqf audio/x-twinvq    
vql audio/x-twinvq    
vrml model/vrml    
vrt x-world/x-vrt    
vts workbook/formulaone    
vtts workbook/formulaone    
vxml application/voicexml+xml    
w60 application/wordperfect6.0   Worderfect 6
w61 application/wordperfect6.1   WordPerfect
waf plugin/wanimate    
wan plugin/wanimate    
wav audio/wav audio/x-pn-windows-pcm, audio/x-wav Microsoft wave uncompressed sound files
wax audio/x-ms-wax   Microsoft compressed audio
wbmp image/vnd.wap.wbmp    
wbxml application/vnd.wap.wbxml    
wi image/wavelet    
wid application/x-DemoShield    
wis application/x-InstallShield    
wlt application/x-mswallet    
wm video/x-ms-wm   Microsoft compressed video
wma audio/x-ms-wma   Microsoft compressed audio
wmd application/x-ms-wmd   Microsoft compressed audio
wmf image/x-wmf   Microsoft proprietary format for vector graphics
wml x-world/x-vrml text/vnd.wap.wml VRML 3D virtual worlds, WAP
wmlc application/vnd.wap.wmlc    
wmls text/vnd.wap.wmlscript    
wmlsc application/vnd.wap.wmlscriptc    
wmv video/x-ms-wmv   Microsoft compressed video. Play with Windows media Player or Winamp. Winamp lets you slide forward and back.
wmx video/x-ms-wmx   Microsoft compressed audio
wmz application/x-ms-wmz   Microsoft compressed audio
wp application/wordperfect   WordPerfect 5
wp5 application/wordperfect   WordPerfect 5
wpd application/wordperfect5.1 application/wordperfect  
wri application/write    
wrl x-world/x-vrml model/vrml  
wrz x-world/x-vrml    
wtx audio/wtx    
wvx video/x-ms-wvx   Microsoft compressed video
xaml application/xaml+xml   Silverlight
xbm image/x-xbitmap    
xdr video/x-videogram    
xht application/xhtml+xml    
xhtml application/xhtml+xml    
xif image/vnd.xiff    
xla application/vnd.ms-excel   Microsoft Excel
xlc application/vnd.ms-excel   Microsoft Excel
xlm application/vnd.ms-excel   Microsoft Excel
xls application/vnd.ms-excel application/xls Microsoft Excel
xlt application/vnd.ms-excel application/xlt Microsoft Excel
xlw application/vnd.ms-excel   Microsoft Excel
xml application/xml text/xml XML, use text/xml implies display. application/xml implies download.
xmlfrag text/plain    
xpm image/x-xpixmap    
xsl application/xml    
xslt application/xslt+xml    
xul application/vnd.mozilla.xul+xml    
xwd image/x-xwindowdump    
xyz chemical/x-xyz    
z application/x-compress    
zip application/zip application/x-compressed, application/x-zip-compressed, multipart/x-zip WinZip, PKZIP
zpa application/pcphoto    

The Printable Problem

MIME messages, for historical reason should contain only 7-bit printable characters. There is a possibilty one of the hops on the email route might drop the high bits on characters in the messages or attachments. What if you need to transmit control characters, 8 bit binary or 16 bit data? You need some mechanism to convert the data to printable text and back. The Content-Transfer-Encoding field in the MIME header controls which technique to use. Some common algorithms include: All these use a wrapper consisting of MIME header fields ahead of the data and and a trailing end-of-data marker string highly unlikely to occur accidentally in the middle of the data.

Eventually this printable encoding will be dropped. Base64 encoding, for example, adds 33% overhead to the transmitted message size. The Internet is now almost completely converted to 8-bit, so it should not usually be necessary.

MIME Types For A Java Website

If you are setting up a Java Website, make sure you set up at least these MIME types.
Typical Extensions and MIMEs for a Java Server
*.bat *.batfrag text/plain
*.class application/octet-stream
*.css *.cssfrag text/css
*.gif image/gif
*.html *.htmlfrag text/html
*.jad text/vnd.sun.j2me.app-descriptor
*.jar application/java-archive
*.jar.pack.gz application/x-java-pack200
*.jardiff application/x-java-archive-diff
*.java *.javafrag text/x-java-source
*.jpg image/jpeg
*.jnlp application/x-java-jnlp-file
*.png image/png
*.ser application/x-java-serialized-object
*.sql *.sqlfrag text/plain
*.txt text/plain
*.xml *.xmlfrag text/xml
*.zip application/zip
There is a database of MIME types and extensions in the Windows Registry. At some point I will mine it for more entries. HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/x-java-jnlp-file. You can get a list of Windows extensions and associated MIME types by typing assoc at the command prompt.

HTML forms use application/x-www-form-urlencoded, though there is no filename.

MIME Hate

People often hate street mimes, perhaps that is why the name MIME was chosen. The reasons to detest MIME types are: In summary MIMES are a half-assed solution to a problem that has created more of a problem than it solved.

MIME Sources

You can find out what MIME types various web servers and sending at you with Rex Swain’s HTTP viewer. It lets you see what a browser would send if you submitted a URL and what the website would send back. Great learning tool for HTTP in general.

You can get the MIME type for a given file using java.net.FileNameMap.getContentTypeFor(filename)

Here is one offial source for MIME types: The definitive IANA list however it has only a fraction of the total is use. Lantech List with some descriptions.

Configuring the Server

Tell your ISP what MIME types and extensions you need. If you have an Apache server, you can configure it yourself simply by uploading a file called .htaccess to your website’s root.

Programs To Handle Video and Audio Streams

Video Links Legend
streaming or downloadable
Click corresponding icon to download player.
Apple QuickTime click to watch
BitTorrent click to watch
DivX click to watch
DVD click to watch
Flash animations click to watch
Google click to watch
Microsoft Media Player click to watch
Microsoft Power Point click to watch
mp3 click to watch
mp4 click to watch
Real Player click to watch
VHS tape click to watch
transcript click to watch
unknown click to watch
You Tube click to watch
Audio Links Legend
streaming or downloadable
Click corresponding icon to download player.
Real Audio click to listen
compressed mp3 click to listen
super compressed mp4 click to listen
Microsoft Media Player click to listen
MIDI music files click to listen
uncompressed au click to listen
Microsoft uncompressed wav click to listen
unknown click to listen
transcript click to watch

JAF built-in MIME Types

JAF, Java Activation Framework, an addon you must download separately from the JDK/JRE, has a class that defines Java’s list of MIME types and associated extensions called javax.activation. MimetypesFileTypeMap. It searches for MIME types in the following places in the following order:
  1. Programmatically added entries to the MimetypesFileTypeMap instance.
  2. The file .mime.types in the user’s home directory.
  3. The file C:\Program Files\java\jre1.6.0_06/lib/mime.types.
  4. The resource named META-INF/mime.types.
  5. The resource named META-INF/mimetypes.default in the activation.jar file.

Learning More

.htaccess
associations
Audio MIME types
Base64
CGI
console
DotWhat: list of extensions, not that many MIMEs filled in yet
encoding
extension
file-extensions.org: database of file extensions and MIME types
fileinfo.net: database of file extensions
Filext.com: database of file extensions, MIME types, and identifying signatures
htaccess
HTTP
IANA
IANA official list
JAF
jar files
jnlp
Lantech List with some descriptions
Mime-Util: determines MIME type based on extension and file signature
Oregon State List
printable characters
Repairing Browser JNLP/JAWS MIME Association
Repairing Windows JNLP/JAWS Association
S/MIME
Spreadsheet of MIME types
UrlCheck
W3Schools list of MIME types
Webmaster-toolkit list of MIME types

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.17] The information on this page is for non-military use only.
You are visitor number 59,328. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/mime.html J:\mindprod\jgloss\mime.html