KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > page > manage > MimeTypeMap


1 /*
2  * Created on May 15, 2006
3  */

4 package com.openedit.page.manage;
5
6 /**
7  * <p>
8  * Interface for a map to determine the MIME type for a file or path
9  * based upon its extension. This interface was extracted from the
10  * class of the same name originally from JPublish (http://www.jpublish.org)
11  * and adapted by Open Edit (http://www.openedit.org).
12  * </p>
13  *
14  * @author Eric Broyles <eric@sandra.com>
15  * @version $Id: MimeTypeMap.java,v 1.11 2006/05/22 18:07:32 ebroyles Exp $
16  */

17 public interface MimeTypeMap
18 {
19
20     /**
21      * Set the default MIME type.
22      *
23      * @param inMimeType The new default MIME type. If null, the DEAFULT_MIME_TYPE is used.
24      */

25     public void setDefaultMimeType(String JavaDoc inMimeType);
26
27     /**
28      * Get the default MIME type.
29      *
30      * @return The default MIME type.
31      */

32     public String JavaDoc getDefaultMimeType();
33
34     /**
35      * Get the MIME type for the given file extension.
36      *
37      * @param inExtension The extension to map to a MIME type.
38      *
39      * @return The MIME type
40      */

41     public String JavaDoc getMimeType(String JavaDoc inExtension);
42
43     /**
44      * Get the MIME type for the given path.
45      *
46      * @param path The path to map the a MIME type.
47      *
48      * @return The MIME type.
49      */

50     public String JavaDoc getPathMimeType(String JavaDoc path);
51
52     public Object JavaDoc get(Object JavaDoc key);
53
54     public Object JavaDoc put(Object JavaDoc arg0, Object JavaDoc arg1);
55
56 }
Popular Tags