This class is obtained with the {#link {@link #getInstance()} method thatrecognizes loaded mime types from the file mime.types
if this file is available at the root of the classpath. The mime.types file format, and most of the content, is taken from the Apache HTTP server's mime.types file.
The format for mime type setting documents is: mimetype
. Any blank lines in the file are ignored, as are lines starting with #
which are considered comments. Lines that have a mimetype but no associated extensions are also ignored.
The MIME type detection methods that take an {@link InputStream} asan argument will never reads more than {@link #getMinLength()} bytesfrom the stream. Also the given stream is never {@link InputStream#close() closed}, {@link InputStream#mark(int) marked}, or {@link InputStream#reset() reset} by the methods. Thus a client canuse the {@link InputStream#markSupported() mark feature} of the stream(if available) to restore the stream back to the state it was before type detection if it wants to process the stream based on the detected type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|