Java Glossary : MIME

CMP home Java glossary home Menu no menu Last updated 2004-06-30 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 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

You are here : home : Java Glossary : M words : MIME.

MIME
Multipurpose Internet Mail Extension described in RFC 822 and RFC 2047. A technique for attaching files to Internet mail by converting raw binary files to printable ASCII.

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, notify me.

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 also called 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.

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    
aab application/x-authorware-bin    
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 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 video
asn application/astound    
asp application/x-asap    
asx video/x-ms-asf   Microsoft video
asz application/astound    
au audio/basic   standard Internet/Java wave sound
avi video/x-msvideo   avi movie
axs application/olescript    
bas text/plain   Basic source
bat text/plain application/octet-stream DOS/Windows command line script
bcpio application/x-bcpio    
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
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
chat application/x-chat    
che application/x-up-cacheop    
cht audio/x-dspeech    
class application/octet-stream application/java-class, application/x-java-vm, application/x-java-applet, application/java 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    
csh application/x-csh    
csm application/x-cu-seeme    
css text/css   Cascading Style Sheet.
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    
doc application/msword   Microsoft Word document formatted.
dsf image/x-mgx-dsf    
dss text/dss    
dst application/tajima    
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/x-msdownload application/octet-stream, application/exe. Sun sometimes use magnus-internal/cgi Windows executable program. Refered to as an application type in the associations editor.
fh4 image/x-freehand    
fh5 image/x-freehand    
fhc image/x-freehand    
fif image/fif    
fml application/fml    
fpx image/x-fpx    
frl application/freeloader    
fs application/X-FSRecipe    
gif image/gif   standard Internet icon image
gsd audio/gsm    
gsm audio/gsm    
gtar application/x-gtar    
gz application/gzip application/x-gzip tar gzip
hdf application/x-hdf    
hdml text/x-hdml    
hqx application/mac-binhex40    
htm text/html   HTML, web browser
html text/html   HTML, web browser
ica application/x-ica   Citrix
ief image/ief   image
ins application/x-NET-Install    
ips application/ips application/x-ipscript  
ipx application/x-ipix    
ivr i-world/i-vrml    
jar application/java-archive application/x-jar compiled compressed java plus data members.
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
jnlp application/x-java-jnlp-file   Java Web Start application descriptor XML file.
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
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    
man application/x-troff-man    
map application/x-httpd-imap    
mbd application/mbedlet    
mcf image/vasa    
mdb application/mdb    
me application/x-troff-me    
mfp application/mirage    
mid audio/x-midi   MIDI sound
midi audio/x-midi   MIDI sound
mif application/x-mif    
mol chemical/x-mdl-molfile    
mov video/quicktime   Quicktime movie player
movie video/x-sgi-movie   movie
mp2 audio/x-mpeg    
mp3 audio/mpeg   mp3 compressed Napster-style compressed audio
mpe video/mpeg   mpeg movie player
mpeg video/mpeg   mpeg movie player
mpg video/mpeg   mpeg movie player
mpire application/x-mpire    
mpl application/x-mpire    
mpp application/vnd.ms-project    
ms application/x-troff-ms    
msi application/msi    
msm application/msm    
n2p application/n2p    
nc application/x-netcdf    
npx application/x-netfpx    
nsc application/x-nschat    
oda application/oda    
ofml application/fml    
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
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    
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
ras image/x-cmu-raster    
rgb image/x-rgb    
rgb image/x-rgb   image
rip image/rip    
rm audio/x-pn-realaudio   Real Audio
rmf audio/rmf audio/x-rmf  
roff application/x-troff    
rpm audio/x-pn-realaudio-plugin   Real Audio
rrf application/x-InstallFromTheWeb    
rtc application/rtc    
rtf application/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
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    
sit application/x-stuffit    
sjf application/octet-stream    
smi application/smil    
smil application/smil    
sml application/smil    
smp application/studiom    
snd audio/basic   standard Internet/Java wave sound
spc text/x-speech    
spl application/futuresplash    
spr application/x-sprite    
sprite application/x-sprite    
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    
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    
tr application/x-troff    
troff application/x-troff    
tsi audio/tsplayer    
tsp application/dsptype    
tsv text/tab-separated-values   tab separated list
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    
vrt x-world/x-vrt    
vts workbook/formulaone    
vtts workbook/formulaone    
w60 application/wordperfect6.0   Worderfect 6
w61 application/wordperfect6.1   WordPerfect
waf plugin/wanimate    
wan plugin/wanimate    
wav audio/wav audio/x-wav Microsoft wave uncompressed sound files
wax audio/x-ms-wax   Microsoft compressed audio
wbmp image/vnd.wap.wbmp    
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    
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
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    
wrz x-world/x-vrml    
wtx audio/wtx    
wvx video/x-ms-wvx   Microsoft compressed video
xbm image/x-xbitmap    
xdr video/x-videogram    
xif image/vnd.xiff    
xls application/xls    
xlt application/xlt    
xml application/xml text/xml XML, use text/xml implies display. application/xml implies download.
xpm image/x-xpixmap    
xwd image/x-xwindowdump    
z application/x-compress    
zip application/x-zip-compressed application/zip, application/x-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.
*.class application/octet-stream
*.css text/css
*.gif image/gif
*.html text/html
*.jar application/java-archive
*.jardiff application/x-java-archive-diff
*.java text/x-java-source
*.jpg image/jpeg
*.jnlp application/x-java-jnlp-file
*.png image/png
*.ser application/x-java-serialized-object
*.txt text/plain
*.zip application/zip
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 are three sources for MIME types: IANA list, Lantech List with some descriptions and Eskimo.com is a less official source.

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.


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 6737.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/mime.html J:\mindprod\jgloss\mime.html