< prev index next >

src/java.activation/share/classes/javax/activation/MimetypesFileTypeMap.java

Print this page

        

*** 31,67 **** import com.sun.activation.registries.MimeTypeFile; import com.sun.activation.registries.LogSupport; /** * This class extends FileTypeMap and provides data typing of files ! * via their file extension. It uses the <code>.mime.types</code> format. <p> * * <b>MIME types file search order:</b><p> * The MimetypesFileTypeMap looks in various places in the user's * system for MIME types file entries. When requests are made * to search for MIME types in the MimetypesFileTypeMap, it searches * MIME types files in the following order: - * <p> * <ol> * <li> Programmatically added entries to the MimetypesFileTypeMap instance. ! * <li> The file <code>.mime.types</code> in the user's home directory. ! * <li> The file &lt;<i>java.home</i>&gt;<code>/lib/mime.types</code>. ! * <li> The file or resources named <code>META-INF/mime.types</code>. ! * <li> The file or resource named <code>META-INF/mimetypes.default</code> ! * (usually found only in the <code>activation.jar</code> file). * </ol> * <p> ! * <b>MIME types file format:</b><p> * ! * <code> ! * # comments begin with a '#'<br> ! * # the format is &lt;mime type> &lt;space separated file extensions><br> ! * # for example:<br> ! * text/plain txt text TXT<br> ! * # this would map file.txt, file.text, and file.TXT to<br> ! * # the mime type "text/plain"<br> ! * </code> * * @author Bart Calder * @author Bill Shannon * * @since 1.6 --- 31,66 ---- import com.sun.activation.registries.MimeTypeFile; import com.sun.activation.registries.LogSupport; /** * This class extends FileTypeMap and provides data typing of files ! * via their file extension. It uses the {@code .mime.types} format. <p> * * <b>MIME types file search order:</b><p> * The MimetypesFileTypeMap looks in various places in the user's * system for MIME types file entries. When requests are made * to search for MIME types in the MimetypesFileTypeMap, it searches * MIME types files in the following order: * <ol> * <li> Programmatically added entries to the MimetypesFileTypeMap instance. ! * <li> The file {@code .mime.types} in the user's home directory. ! * <li> The file {@literal <}<i>java.home</i>{@literal >}{@code /lib/mime.types}. ! * <li> The file or resources named {@code META-INF/mime.types}. ! * <li> The file or resource named {@code META-INF/mimetypes.default} ! * (usually found only in the {@code activation.jar} file). * </ol> * <p> ! * <b>MIME types file format:</b> * ! * <pre>{@code ! * # comments begin with a '#' ! * # the format is <mime type> <space separated file extensions> ! * # for example: ! * text/plain txt text TXT ! * # this would map file.txt, file.text, and file.TXT to ! * # the mime type "text/plain" ! * }</pre> * * @author Bart Calder * @author Bill Shannon * * @since 1.6
*** 275,285 **** } /** * Return the MIME type of the file object. * The implementation in this class calls ! * <code>getContentType(f.getName())</code>. * * @param f the file * @return the file's MIME type */ public String getContentType(File f) { --- 274,284 ---- } /** * Return the MIME type of the file object. * The implementation in this class calls ! * {@code getContentType(f.getName())}. * * @param f the file * @return the file's MIME type */ public String getContentType(File f) {
< prev index next >