MIME : Java Glossary

go to home page M words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish 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) ©1996-2010 2008-08-03 Roedy Green, Canadian Mind Products
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 atemail Roedy Green'.

Sorry, you need Java 1.5+ to run this Applet.

If, mimecheck, the above MIME Check signed Java Applet does not work…

  1. This signed Java Applet needs 32-bit (not-64-bit) Java 1.5 or later, best version 1.5.0_22 or later, version 1.6.0_18 recommended and a recent browser.
  2. Firefox 3.6 requires Java 1.6.0_10 or later.
  3. If you have Windows 7 64-bit and Internet Explorer 64-bit, you can use 64-bit Java.
  4. You should see the Applet above looking much like the screenshot. If you don’t, the following should help you get it working:
  5. If you are using Microsoft Internet Explorer, try another browser. Seriously. Microsoft has taken great pains, over and over, to screw up Java and every other multi-platform standardisation.
  6. If you are using Internet Explorer 7 or 8, you must allow blocked content permission for Active X to run. This also gives permission to Java to run. Click the Information bar, and then click Allow blocked content. Unfortunately, this also allows dangerous ActiveX code to run. However, you must do this in order to get access to perfectly-safe Java Applets running in a sandbox. This is part of Microsoft’s war on Java. Don’t put up with it! Use a different browser.
  7. For this Applet to work, you must click grant/accept to give it permission to read from any server on the web.
  8. Optionally, you may permanently install the Canadian Mind Products code-signing certificate so you don’t have to grant each time.
  9. If the above Applet appears to freeze-up, click Alt-Esc repeatedly to check for any buried permission dialog box.
  10. If you have certificate troubles, check the installed certificates and remove or update any obsolete or suspected defective certificates. The only certificate used by this program is mindprodcert2010dsa.cer.
  11. Especially if this Applet has worked before, try clearing the browser cache and rebooting.
  12. To ensure your Java is up to date, check with Wassup. First, download it and run it as an application independent of your browser, then run it online as an Applet to add the complication of your browser.
  13. If the above Applet does not work, check the Java console for error messages.
  14. If the above Applet does not work, you might have better luck with the downloadable version.
  15. If you are using Mac OS X and would like an improved Look and Feel, download the QuaQua look & feel from randelshofer.ch/quaqua. UnZip the contained quaqua.jar and install it in ~/Library/Java/Extensions or one of the other ext dirs.
  16. If you still can’t get the program working click HELP for more detail.
  17. If you can’t get the above Applet working after trying the advice above and from the HELP button below, have bugs to report or ideas to improve the program or its documentation, please send me an email atemail Roedy Green.
Java powered   Get New Java  Get New Browser   Help
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 types. The content-type and content-encoding fields in the RFC 1945 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
123application/vnd.lotus-1-2-3  
3dmx-world/x-3dmf  
3dmfx-world/x-3dmf  
3gpvideo/3gp ok for video or audio
3gppaudio/3gp audio only, also 3gp
7zapplication/x-7z-compressed  
aabapplication/x-authorware-bin  
aacaudio/aacaudio/MP4-LATM, audio/x-aac, audio/x-mp4Apple QuickTime compressed audio used in iPods
aamapplication/x-authorware-map  
aasapplication/x-authorware-map  
adrapplication/x-msaddr  
aflvideo/animaflex  
afmapplication/x-font-type1 Adobe font
aiapplication/postscript Adobe PostScript
aifaudio/x-aiff MacIntosh sound
aifcaudio/x-aiff MacIntosh sound
aiffaudio/x-aiff MacIntosh uncompressed sound
altapplication/x-up-alert  
aosapplication/x-nokia-9000-communicator-add-on-software  
arjapplication/x-arj  
asctext/plain text
asdapplication/astound  
asfvideo/x-ms-asf Microsoft media audio and/or video
asnapplication/astound  
aspapplication/x-asap  
asxvideo/x-ms-asf Microsoft video playlist. XML, with entries giving URL for each file to play in order.
aszapplication/astound  
atomapplication/atom+xml  
auaudio/basicaudio/x-pn-austandard Unix/Internet/Java uncompressed wave sound
avivideo/avivideo/x-msvideoearlier Microsoft video format. avi movie, works with Winamp (best), MS Media Player (often audio only), or QuickTime (in theory)
axsapplication/olescript  
bastext/plain Basic source
battext/plainapplication/octet-streamDOS/Windows command line script
batfragtext/plain  
bcpioapplication/x-bcpio  
bildimage/jpeg  
binapplication/octet-streamapplication/x-macbinaryexecutable 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.
bmpimage/bmpimage/x-ms-bmpWindows image
btmfragtext/plain  
cacertapplication/x-x509-ca-cert  
ccstext/ccs  
cdfapplication/x-netcdf  
cdrapplication/x-cdr  
cerapplication/x-x509-ca-cert X.509 Certificate format
cgmimage/cgm  
chatapplication/x-chat  
cheapplication/x-up-cacheop  
chmapplication/chm Windows compile help file format
chtaudio/x-dspeech  
classapplication/java-vmapplication/java, application/java-class, application/octet-stream, application/x-java-applet, application/x-java-vmcompiled Java
clpimage/x-clp  
cmdtext/plain Windows NT command line script
cmximage/x-cmx  
cncapplication/x-cnc  
codimage/cis-cod  
codaapplication/x-coda  
comapplication/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.
conapplication/x-connector  
cpiimage/cpi  
cpioapplication/x-cpio  
cptapplication/mac-compactpro  
crtapplication/x-x509-ca-cert X.509 Certificate format
cshapplication/x-csh  
csmapplication/x-cu-seeme  
csstext/css Cascading Style Sheet.
cssfragtext/plain  
csvtext/comma-separated-values Microsoft’s format for import/export to Excel, Word and Access.
cuapplication/x-cu-seeme  
cutimage/x-halo-cut  
dbfapplication/octet-stream  
dcrapplication/x-director  
derapplication/x-x509-ca-cert X.509 Certificate format
digmultipart/mixed  
dirapplication/x-director  
djvimage/vnd.djvu  
djvuimage/vnd.djvu  
dllapplication/octet-stream  
dmgapplication/octet-stream  
dmsapplication/octet-stream  
docapplication/msword Microsoft Word document formatted.
dsfimage/x-mgx-dsf  
dsstext/dss  
dstapplication/tajima  
dtdapplication/xml-dtdtext/xml 
dusaudio/x-dspeech  
dviapplication/x-dvi  
dwfdrawing/x-dwf  
dwgimage/vnd  
dxfimage/vnd  
dxrapplication/x-director  
earapplication/java-archive enterprise archive, EJB app, compiled compressed java plus data members.
ebkapplication/x-expandedbook  
ecertapplication/x-x509-email-cert  
emailapplication/x-x509-email-cert  
emfimage/x-emf  
eotapplication/vnd.ms-fontobject Microsoft downloadable font
epsapplication/postscript Encapsulated Adobe PostScript
erfapplication/x-hsp-erf  
esaudio/echospeech  
etfimage/x-etf  
etxtext/x-setext  
evyapplication/envoyapplication/x-envoyEnvoy
exeapplication/octet-streamapplication/exe, application/x-msdos-download, application/x-msdownload, magnus-internal/cgiWindows executable program. Refered to as an application type in the associations editor.
ezapplication/andrew-inset  
fh4image/x-freehand  
fh5image/x-freehand  
fhcimage/x-freehand  
fifimage/fif  
flvvideo/x-flv Flash video
fmlapplication/fml  
fpximage/x-fpx  
frlapplication/freeloader  
fsapplication/X-FSRecipe  
gifimage/gif standard Internet icon image
gramapplication/srgs  
grxmlapplication/srgs+xml  
gsdaudio/gsm  
gsmaudio/gsm  
gtarapplication/x-gtar  
gviapplication/x-gsp Google Video, copy protected.
gvpapplication/x-gsp Google Video pointer
gzapplication/gzipapplication/x-gziptar gzip
hdfapplication/x-hdf  
hdmltext/x-hdml  
hlpapplication/octet-stream Windows old-style help file format. See also chm. This is the MIME type Microsoft uses on its servers.
hqxapplication/mac-binhex40  
htmtext/html HTML, web browser
htmltext/html HTML, web browser
htmlfragtext/plain  
icaapplication/x-ica Citrix
icex-conference/x-cooltalk  
icoimage/x-icon  
icstext/calendar  
iefimage/ief image
ifbtext/calendar  
igesmodel/iges  
igsmodel/iges  
insapplication/x-NET-Install  
ipsapplication/ipsapplication/x-ipscript 
ipxapplication/x-ipix  
ivri-world/i-vrml  
jadtext/vnd.sun.j2me.app-descriptor J2ME cell-phone or handheld application.
jarapplication/java-archiveapplication/x-jarcompiled compressed java plus data members.
jar.pack.gzapplication/x-java-pack200 jars super-compressed with pack200.exe
jardiffapplication/x-java-archive-diff java jar update file, contains only jar members that have changed.
javatext/x-java-sourcetext/ plainjava source code
javafragtext/plain  
jnlpapplication/x-java-jnlp-file Java Web Start application descriptor XML file.
jnlpfragtext/plain  
jp2image/jp2 lossless JPEG-2000
jpeimage/jpegimage/pjpegstandard Internet photo image
jpegimage/jpegimage/pjpegstandard Internet photo image
jpgimage/jpegimage/pjpegstandard Internet photo image
jpsimage/x-jps  
jsapplication/x-javascript JavaScript
karaudio/midi  
latexapplication/x-latex  
lhaapplication/octet-stream  
litapplication/lit  
lsptext/lsp  
lwpapplication/x-wordpro  
lzhapplication/octet-stream  
lzxapplication/octet-stream  
m3uaudio/x-mpegurl  
m4aaudio/mp4 M4A Audio
m4uvideo/vnd.mpegurl  
manapplication/x-troff-man  
mapapplication/x-httpd-imap  
mathmlapplication/mathml+xml  
mbdapplication/mbedlet  
mcfimage/vasa  
mdbapplication/mdb  
meapplication/x-troff-me  
meshmodel/mesh  
mfpapplication/mirage  
midaudio/x-midiaudio/midiMIDI sound
midiaudio/x-midiaudio/midiMIDI sound
mifapplication/x-mifapplication/vnd.mif 
molchemical/x-mdl-molfile  
movvideo/quicktime Quicktime movie player
movievideo/x-sgi-movie movie
mp2audio/mpegaudio/x-mpeg 
mp3audio/mp3audio/mpeg, audio/x-mp3, audio/x-mpgmp3/mpeg compressed audio. Popular format for portable music players.
mp4video/mp4  
mpevideo/mpeg mpeg movie player
mpegvideo/mpeg mpeg movie player
mpgvideo/mpeg mpeg movie player
mpgaaudio/mpeg  
mpireapplication/x-mpire  
mplapplication/x-mpire  
mppapplication/vnd.ms-project  
msapplication/x-troff-ms  
mshmodel/mesh  
msiapplication/msiapplication/x-msiMicrosoft install files
msmapplication/msm  
mxuvideo/vnd.mpegurl  
n2papplication/n2p  
ncapplication/x-netcdf  
npxapplication/x-netfpx  
nscapplication/x-nschat  
odaapplication/oda  
odbapplication/vnd.oasis.opendocument.database OpenDocument Database
odcapplication/vnd.oasis.opendocument.chart OpenDocument Chart
odfapplication/vnd.oasis.opendocument.formula OpenDocument Formula
odgapplication/vnd.oasis.opendocument.graphics OpenDocument Drawing
odiapplication/vnd.oasis.opendocument.image OpenDocument Image
odmapplication/vnd.oasis.opendocument.text-master OpenDocument Master Document
odpapplication/vnd.oasis.opendocument.presentation OpenDocument Presentation
odsapplication/vnd.oasis.opendocument.spreadsheet OpenDocument Spreadsheet
odtapplication/vnd.oasis.opendocument.text Oasis portable document format (Open Office)
ofmlapplication/fml  
ogaaudio/ogg Ogg audio
oggaudio/x-oggvorbisapplication/oggencapsulation for Vorbis I non-proprietary audio or video.
ogvvideo/ogg Ogg video
ogxapplication/ogg muliplex ogg stream
otgapplication/vnd.oasis.opendocument.graphics-template OpenDocument Drawing Template
othapplication/vnd.oasis.opendocument.text-web HTML Document Template
otpapplication/vnd.oasis.opendocument.presentation-template OpenDocument Presentation Template
otsapplication/vnd.oasis.opendocument.spreadsheet-template OpenDocument Spreadsheet Template
ottapplication/vnd.oasis.opendocument.text-template OpenDocument Text Template
oxtapplication/vnd.openofficeorg.extension OpenOffice.org extension
p12application/x-pkcs12 PKCS-12 certificate
p7bapplication/x-pkcs7-certificates PCKS-7 binary public key export
p7capplication/x-pkcs7-mime PKCS-7 binary public key export
p7mapplication/x-pkcs7-mime encrypted file.
p7rapplication/x-pkcs7-certreqresp PKCS-7 certificate request response
p7sapplication/x-pkcs7-signature digtal signature.
pacapplication/x-ns-proxy-autoconfig  
pageapplication/x-coda  
pbdapplication/vnd.powerbuilder6  
pbmimage/x-portable-bitmap bitmap image
pdbchemical/x-pdb  
pdfapplication/pdf Adobe Acrobat Portable Document Format
pfaapplication/x-font-type1 Adobe font
pfbapplication/x-font-type1 Adobe font
pfmapplication/x-font-type1 Adobe font
pfrapplication/font-tdpfr  
pfxapplication/x-pkcs12 PKCS-12 certificate
pgmimage/x-portable-graymap grayscale image
pgnapplication/x-chess-pgn  
pgpapplication/x-pgp-plugin Pretty Good Privacy
pgrtext/parsnegar-document  
phpapplication/x-httpd-php  
php3application/x-httpd-php3  
php4application/x-httpd-php  
plsapplication/pls  
pngimage/png Portal Network Graphics image
pnmimage/x-portable-anymap  
potapplication/mspowerpoint  
ppmimage/x-portable-pixmap pixel image
ppsapplication/mspowerpointapplication/vnd.ms-powerpoint, application/x-mspowerpointMicrosoft PowerPoint
pptapplication/mspowerpointapplication/vnd.ms-powerpoint 
ppzapplication/mspowerpoint  
pqfapplication/x-cprplayer  
pqiapplication/cprplayer  
przapplication/vnd.lotus-freelance Lotus/IBM Freelance presenation
psapplication/postscript Adobe PostScript
psrapplication/datawindow  
ptlkapplication/listenup  
pushmultipart/x-mixed-replace  
qd3x-world/x-3dmf  
qd3dx-world/x-3dmf  
qrtapplication/quest  
qtvideo/quicktime Quicktime movie player
qtiimage/x-quicktime  
qtlapplication/x-quicktimeplayer  
raaudio/x-pn-realaudio Real Audio
ramaudio/x-pn-realaudio Real Audio
rarapplication/x-rar-compressed Winrar compressed
rasimage/x-cmu-raster  
rdfapplication/rdf+xml  
rgbimage/x-rgb image
ripimage/rip  
rmaudio/x-pn-realaudioapplication/vnd.rn-realmediaReal Audio
rmfaudio/rmfaudio/x-rmf 
rmmaudio/x-pn-realaudio  
rmsaudio/x-realaudio-secure  
rngapplication/ringing-tones Nokia phone ringtones. Also used for Relaxing.org schema files.
roffapplication/x-troff  
rpmaudio/x-pn-realaudio-plugin Real Audio
rrfapplication/x-InstallFromTheWeb  
rssapplication/rss+xmltext/xmlfor RSS-2 podcasting feeds. Unfortunately, it does not distinguish between text, audio and video. RSS-1 uses application/xml or application/rdf+xml.
rtcapplication/rtc  
rtfapplication/rtftext/rtfrich text format
rtxtext/richtext rich text
scaapplication/x-supercard  
scertapplication/x-x509-server-cert  
scrapplication/octet-stream Windows screensavers containing executable code. Beware! Frequently contain viruses.
seqapplication/octet-stream-bin  
serapplication/x-java-serialized-object Java serialised object
sgmtext/sgml  
sgmltext/sgml  
shapplication/x-sh  
sharapplication/x-shar  
shtmltext/x-server-parsed-html server side includes; web server expands embedded commands. Sometimes htm and html files are parsed for embedded commands too.
shwapplication/presentations  
sigapplication/pgp-signature  
silomodel/mesh  
sitapplication/x-stuffit  
sjfapplication/octet-stream  
skdapplication/x-koan  
skmapplication/x-koan  
skpapplication/x-koan  
sktapplication/x-koan  
smiapplication/smil  
smilapplication/smil  
smlapplication/smil  
smpapplication/studiom  
sndaudio/basic standard Internet/Java wave sound
soapplication/octet-stream  
spctext/x-speechapplication/x-pkcs7-certificatesPKCS-7/X.509 Authenticode public key
splapplication/futuresplashapplication/x-futuresplash 
sprapplication/x-sprite  
spriteapplication/x-sprite  
sqltext/plain  
sqlfragtext/plain  
srcapplication/x-wais-source  
ssitext/x-server-parsed-html server side includes; web server expands embedded commands. Sometimes htm and html files are parsed for embedded commands too.
stkapplication/hstu  
streamaudio/x-qt-stream  
sv4cpioapplication/x-sv4cpio  
sv4crcapplication/x-sv4crc  
svfimage/vnd  
svgimage/svg+xml  
svhimage/svh  
svrx-world/x-svr  
swaapplication/x-director  
swfapplication/x-shockwave-flash Shockwave Flash, not straight white female.
tapplication/x-troff  
talkapplication/talker  
tarapplication/x-tar Unix tar archive
tbkapplication/toolbook  
tclapplication/x-tcl  
texapplication/x-tex  
texiapplication/x-texinfo  
texinfoapplication/x-texinfo  
texttext/plain  
tgzapplication/gzipapplication/x-gziptar gzip
tifimage/tiff bit map image
tiffimage/tiff bit map image
tldtext/xml tag library description xml
tlkapplication/x-tlk  
tmvapplication/x-Parable-Thing  
torrentapplication/x-bittorrent BitTorrent
trapplication/x-troff  
troffapplication/x-troff  
tsiaudio/tsplayer  
tspapplication/dsptype  
tsqapplication/timestamp-query request to digitally sign and timestamp, usually a Jar digest. DER-base64 encoded.
tsrapplication/timestamp-reply response from a CA to digitally sign and timestamp, usually a Jar digest. DER-base64 encoded.
tsvtext/tab-separated-values tab separated list
ttffont/ttf TrueType font
txttext/plain  
u98urdu/urdu98  
ucertapplication/x-x509-user-cert  
uinapplication/x-icq  
usercertapplication/x-x509-user-cert  
usrapplication/x-x509-user-cert X.509 Certificate
ustarapplication/x-ustar  
vbdapplication/activexdocument  
vcdapplication/x-cdlink  
vcftext/x-vcard vCard
vewapplication/groupwise Novell GroupWise
vgmvideo/x-videogram  
vgpvideo/x-videogram-plugin  
vgxvideo/x-videogram  
vivvideo/vnd.vivo  
vivovideo/vnd.vivo  
vmdapplication/vocaltec-media-desc  
vmfapplication/vocaltec-media-file  
vmiapplication/x-dreamcast-vms-info  
vmsapplication/x-dreamcast-vms  
voxaudio/voxware  
vpaapplication/vpa  
vqeaudio/x-twinvq-plugin  
vqfaudio/x-twinvq  
vqlaudio/x-twinvq  
vrmlmodel/vrml  
vrtx-world/x-vrt  
vtsworkbook/formulaone  
vttsworkbook/formulaone  
vxmlapplication/voicexml+xml  
w60application/wordperfect6.0 Worderfect 6
w61application/wordperfect6.1 WordPerfect
wafplugin/wanimate  
wanplugin/wanimate  
warapplication/java-archive web archive, servlet app, compiled compressed java plus data members.
wavaudio/wavaudio/x-pn-windows-pcm, audio/x-wavMicrosoft wave uncompressed sound files
waxaudio/x-ms-wax Microsoft compressed audio
wbmpimage/vnd.wap.wbmp  
wbxmlapplication/vnd.wap.wbxml  
wiimage/wavelet  
widapplication/x-DemoShield  
wisapplication/x-InstallShield  
wltapplication/x-mswallet  
wmvideo/x-ms-wm Microsoft compressed video
wmaaudio/x-ms-wma Microsoft compressed audio
wmdapplication/x-ms-wmd Microsoft compressed audio
wmfimage/x-wmf Microsoft proprietary format for vector graphics
wmlx-world/x-vrmltext/vnd.wap.wmlVRML 3D virtual worlds, WAP
wmlcapplication/vnd.wap.wmlc  
wmlstext/vnd.wap.wmlscript  
wmlscapplication/vnd.wap.wmlscriptc  
wmvvideo/x-ms-wmv Microsoft compressed video. Play with Windows media Player or Winamp. Winamp lets you slide forward and back.
wmxvideo/x-ms-wmx Microsoft compressed audio
wmzapplication/x-ms-wmz Microsoft compressed audio
wpapplication/wordperfect WordPerfect 5
wp5application/wordperfect WordPerfect 5
wpdapplication/wordperfect5.1application/wordperfect 
wriapplication/write  
wrlx-world/x-vrmlmodel/vrml 
wrzx-world/x-vrml  
wtxaudio/wtx  
wvxvideo/x-ms-wvx Microsoft compressed video
xamlapplication/xaml+xml Silverlight
xbmimage/x-xbitmap  
xdrvideo/x-videogram  
xhtapplication/xhtml+xml  
xhtmlapplication/xhtml+xml  
xifimage/vnd.xiff  
xlaapplication/vnd.ms-excel Microsoft Excel
xlcapplication/vnd.ms-excel Microsoft Excel
xlmapplication/vnd.ms-excel Microsoft Excel
xlsapplication/vnd.ms-excelapplication/xlsMicrosoft Excel
xltapplication/vnd.ms-excelapplication/xltMicrosoft Excel
xlwapplication/vnd.ms-excel Microsoft Excel
xmlapplication/xmltext/xmlXML, use text/xml implies display. application/xml implies download.
xmlfragtext/plain  
xpiapplication/x-xpinstall Firefox/Thunderbird add-on installer
xpmimage/x-xpixmap  
xslapplication/xml  
xsltapplication/xslt+xml  
xulapplication/vnd.mozilla.xul+xml  
xwdimage/x-xwindowdump  
xyzchemical/x-xyz  
zapplication/x-compress  
zipapplication/zipapplication/x-compressed, application/x-zip-compressed, multipart/x-zipWinZip, PKZIP
zpaapplication/pcphoto  
otf, OpenType font files, don’t yet have an assigned MIME type.

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
battext/plain
batfragtext/plain
classapplication/java-vm
csstext/css
cssfragtext/plain
exeapplication/octet-stream
gifimage/gif
htmltext/html
htmlfragtext/plain
jadtext/vnd.sun.j2me.app-descriptor
jarapplication/java-archive
jar.pack.gzapplication/x-java-pack200
jardiffapplication/x-java-archive-diff
javatext/x-java-source
javafragtext/plain
jnlpapplication/x-java-jnlp-file
jpgimage/jpeg
jsapplication/x-javascript
mp3audio/mp3
odtapplication/vnd.oasis.opendocument.text
pngimage/png
rssapplication/rss+xml
serapplication/x-java-serialized-object
sqltext/plain
sqlfragtext/plain
swfapplication/x-shockwave-flash
txttext/plain
warapplication/java-archive
wavaudio/wav
xmlapplication/xml
xmlfragtext/plain
zipapplication/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
IBM/Lotus Freelance presentation click to watch
Google click to watch
Microsoft Media Player click to watch
Microsoft Power Point click to watch
mpg click to watch
mp3 click to watch
mp4 click to watch
Real Player click to watch
Shockwave click to watch
VHS tape click to watch
You Tube click to watch
unknown click to watch
lyrics click to listen
transcript 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
lyrics click to listen
transcript click to listen

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\jre6/lib/mime.types.
  4. The resource named META-INF/mime.types.
  5. The resource named META-INF/mimetypes.default in the activation.jar file.

Local Files

What happens with file:// URLs to access local files? You don’t have a webserver out there providing MIME types in the HTTP headers. In Windows, in the registry, is an association from extension to MIME type, which they call content type. However, Java ignores this.

Learning More

Sun’s Javadoc on MimeType class : available:

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/mime.html J:\mindprod\jgloss\mime.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.112]
You are visitor number 113,062.