Java Reference
In-Depth Information
Table 4.4: MIME Families
Method/Function Name Purpose
application
Application, or raw binary data.
audio
Sounds and music.
example
Used only for example types.
image
Images.
message
Mail messages.
model
Compound type document.
multipart
Another compound type documents.
text
Text formats.
video
Video formats.
There are many different MIME types under each of these families. However, there is
only a handful that you will commonly see. Table 4.5 summarizes these.
Table 4.5: Common MIME Types
MIME Type
Purpose
image/gif
GIF image files.
image/jpeg
JPEG image files.
image/png
PNG image files.
image/tiff
TIFF image files.
text/html
HTML text files.
text/plain
Unformatted text files.
Often, the program will only need to look at the family. For example, if you wanted to
download text and binary files differently, you would simply look at the family part of the
MIME type. If it is determined that text is the family, you may download the URL as a text
file. Any other family would require downloading the information as a binary file. The differ-
ence between a binary file and a text file is that binary files are copied exactly to the hard
drive, whereas text file's line endings are reformatted properly for the resident operating
system.
Search WWH ::




Custom Search