You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by pa...@apache.org on 2019/05/21 03:37:41 UTC

svn commit: r1045252 [15/41] - in /websites/production/turbine/content/fulcrum/fulcrum-mimetype: ./ announcements/ apidocs/ apidocs/org/apache/fulcrum/mimetype/ apidocs/org/apache/fulcrum/mimetype/class-use/ apidocs/org/apache/fulcrum/mimetype/util/ ap...

Modified: websites/production/turbine/content/fulcrum/fulcrum-mimetype/apidocs/src-html/org/apache/fulcrum/mimetype/MimeTypeService.html
==============================================================================
--- websites/production/turbine/content/fulcrum/fulcrum-mimetype/apidocs/src-html/org/apache/fulcrum/mimetype/MimeTypeService.html (original)
+++ websites/production/turbine/content/fulcrum/fulcrum-mimetype/apidocs/src-html/org/apache/fulcrum/mimetype/MimeTypeService.html Tue May 21 03:37:39 2019
@@ -1,186 +1,190 @@
-<HTML>
-<BODY BGCOLOR="white">
-<PRE>
-<FONT color="green">001</FONT>    package org.apache.fulcrum.mimetype;<a name="line.1"></a>
-<FONT color="green">002</FONT>    <a name="line.2"></a>
-<FONT color="green">003</FONT>    <a name="line.3"></a>
-<FONT color="green">004</FONT>    /*<a name="line.4"></a>
-<FONT color="green">005</FONT>     * Licensed to the Apache Software Foundation (ASF) under one<a name="line.5"></a>
-<FONT color="green">006</FONT>     * or more contributor license agreements.  See the NOTICE file<a name="line.6"></a>
-<FONT color="green">007</FONT>     * distributed with this work for additional information<a name="line.7"></a>
-<FONT color="green">008</FONT>     * regarding copyright ownership.  The ASF licenses this file<a name="line.8"></a>
-<FONT color="green">009</FONT>     * to you under the Apache License, Version 2.0 (the<a name="line.9"></a>
-<FONT color="green">010</FONT>     * "License"); you may not use this file except in compliance<a name="line.10"></a>
-<FONT color="green">011</FONT>     * with the License.  You may obtain a copy of the License at<a name="line.11"></a>
-<FONT color="green">012</FONT>     *<a name="line.12"></a>
-<FONT color="green">013</FONT>     *   http://www.apache.org/licenses/LICENSE-2.0<a name="line.13"></a>
-<FONT color="green">014</FONT>     *<a name="line.14"></a>
-<FONT color="green">015</FONT>     * Unless required by applicable law or agreed to in writing,<a name="line.15"></a>
-<FONT color="green">016</FONT>     * software distributed under the License is distributed on an<a name="line.16"></a>
-<FONT color="green">017</FONT>     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY<a name="line.17"></a>
-<FONT color="green">018</FONT>     * KIND, either express or implied.  See the License for the<a name="line.18"></a>
-<FONT color="green">019</FONT>     * specific language governing permissions and limitations<a name="line.19"></a>
-<FONT color="green">020</FONT>     * under the License.<a name="line.20"></a>
-<FONT color="green">021</FONT>     */<a name="line.21"></a>
-<FONT color="green">022</FONT>    <a name="line.22"></a>
-<FONT color="green">023</FONT>    <a name="line.23"></a>
-<FONT color="green">024</FONT>    import java.io.File;<a name="line.24"></a>
-<FONT color="green">025</FONT>    import java.util.Locale;<a name="line.25"></a>
-<FONT color="green">026</FONT>    <a name="line.26"></a>
-<FONT color="green">027</FONT>    import org.apache.fulcrum.mimetype.util.MimeType;<a name="line.27"></a>
-<FONT color="green">028</FONT>    <a name="line.28"></a>
-<FONT color="green">029</FONT>    /**<a name="line.29"></a>
-<FONT color="green">030</FONT>     * The MimeType Service maintains mappings between MIME types and<a name="line.30"></a>
-<FONT color="green">031</FONT>     * the corresponding file name extensions, and between locales and<a name="line.31"></a>
-<FONT color="green">032</FONT>     * character encodings. The mappings are typically defined in<a name="line.32"></a>
-<FONT color="green">033</FONT>     * properties or files located in user's home directory, Java home<a name="line.33"></a>
-<FONT color="green">034</FONT>     * directory or the current class jar depending on the implementation.<a name="line.34"></a>
-<FONT color="green">035</FONT>     *<a name="line.35"></a>
-<FONT color="green">036</FONT>     * @author &lt;a href="mailto:ilkka.priha@simsoft.fi"&gt;Ilkka Priha&lt;/a&gt;<a name="line.36"></a>
-<FONT color="green">037</FONT>     * @author &lt;a href="mailto:mcconnell@apache.org"&gt;Stephen McConnell&lt;/a&gt;<a name="line.37"></a>
-<FONT color="green">038</FONT>     * @version $Id: MimeTypeService.java 535465 2007-05-05 06:58:06Z tv $<a name="line.38"></a>
-<FONT color="green">039</FONT>     */<a name="line.39"></a>
-<FONT color="green">040</FONT>    public interface MimeTypeService<a name="line.40"></a>
-<FONT color="green">041</FONT>    {<a name="line.41"></a>
-<FONT color="green">042</FONT>        /** Avalon role - used to id the component within the manager */<a name="line.42"></a>
-<FONT color="green">043</FONT>        String ROLE = MimeTypeService.class.getName();<a name="line.43"></a>
-<FONT color="green">044</FONT>    <a name="line.44"></a>
-<FONT color="green">045</FONT>        /**<a name="line.45"></a>
-<FONT color="green">046</FONT>         * Sets a MIME content type mapping to extensions to the map.<a name="line.46"></a>
-<FONT color="green">047</FONT>         * The extension is specified by a MIME type name followed<a name="line.47"></a>
-<FONT color="green">048</FONT>         * by a list of file name extensions separated by a whitespace.<a name="line.48"></a>
-<FONT color="green">049</FONT>         *<a name="line.49"></a>
-<FONT color="green">050</FONT>         * @param spec a MIME type extension specification to add.<a name="line.50"></a>
-<FONT color="green">051</FONT>         */<a name="line.51"></a>
-<FONT color="green">052</FONT>        public void setContentType(String spec);<a name="line.52"></a>
-<FONT color="green">053</FONT>    <a name="line.53"></a>
-<FONT color="green">054</FONT>        /**<a name="line.54"></a>
-<FONT color="green">055</FONT>         * Gets the MIME content type for a file as a string.<a name="line.55"></a>
-<FONT color="green">056</FONT>         *<a name="line.56"></a>
-<FONT color="green">057</FONT>         * @param file The file to look up a MIME type mapping for.<a name="line.57"></a>
-<FONT color="green">058</FONT>         * @return the MIME type string.<a name="line.58"></a>
-<FONT color="green">059</FONT>         */<a name="line.59"></a>
-<FONT color="green">060</FONT>        public String getContentType(File file);<a name="line.60"></a>
-<FONT color="green">061</FONT>    <a name="line.61"></a>
-<FONT color="green">062</FONT>        /**<a name="line.62"></a>
-<FONT color="green">063</FONT>         * Gets the MIME content type for a named file as a string.<a name="line.63"></a>
-<FONT color="green">064</FONT>         *<a name="line.64"></a>
-<FONT color="green">065</FONT>         * @param fileName The name of the file to look up a MIME type<a name="line.65"></a>
-<FONT color="green">066</FONT>         * mapping for.<a name="line.66"></a>
-<FONT color="green">067</FONT>         * @return the MIME type string.<a name="line.67"></a>
-<FONT color="green">068</FONT>         */<a name="line.68"></a>
-<FONT color="green">069</FONT>        public String getContentType(String fileName);<a name="line.69"></a>
-<FONT color="green">070</FONT>    <a name="line.70"></a>
-<FONT color="green">071</FONT>        /**<a name="line.71"></a>
-<FONT color="green">072</FONT>         * Gets the MIME content type for a file name extension as a string.<a name="line.72"></a>
-<FONT color="green">073</FONT>         *<a name="line.73"></a>
-<FONT color="green">074</FONT>         * @param fileName The name of the file to look up a MIME type<a name="line.74"></a>
-<FONT color="green">075</FONT>         * mapping for.<a name="line.75"></a>
-<FONT color="green">076</FONT>         * @param def The default MIME type to use if no mapping exists.<a name="line.76"></a>
-<FONT color="green">077</FONT>         * @return the MIME type string.<a name="line.77"></a>
-<FONT color="green">078</FONT>         */<a name="line.78"></a>
-<FONT color="green">079</FONT>        public String getContentType(String fileName, String def);<a name="line.79"></a>
-<FONT color="green">080</FONT>    <a name="line.80"></a>
-<FONT color="green">081</FONT>        /**<a name="line.81"></a>
-<FONT color="green">082</FONT>         * Gets the MIME content type for a file.<a name="line.82"></a>
-<FONT color="green">083</FONT>         *<a name="line.83"></a>
-<FONT color="green">084</FONT>         * @param file the file.<a name="line.84"></a>
-<FONT color="green">085</FONT>         * @return the MIME type.<a name="line.85"></a>
-<FONT color="green">086</FONT>         */<a name="line.86"></a>
-<FONT color="green">087</FONT>        public MimeType getMimeContentType(File file);<a name="line.87"></a>
-<FONT color="green">088</FONT>    <a name="line.88"></a>
-<FONT color="green">089</FONT>        /**<a name="line.89"></a>
-<FONT color="green">090</FONT>         * Gets the MIME content type for a named file.<a name="line.90"></a>
-<FONT color="green">091</FONT>         *<a name="line.91"></a>
-<FONT color="green">092</FONT>         * @param name the name of the file.<a name="line.92"></a>
-<FONT color="green">093</FONT>         * @return the MIME type.<a name="line.93"></a>
-<FONT color="green">094</FONT>         */<a name="line.94"></a>
-<FONT color="green">095</FONT>        public MimeType getMimeContentType(String name);<a name="line.95"></a>
-<FONT color="green">096</FONT>    <a name="line.96"></a>
-<FONT color="green">097</FONT>        /**<a name="line.97"></a>
-<FONT color="green">098</FONT>         * Gets the MIME content type for a file name extension.<a name="line.98"></a>
-<FONT color="green">099</FONT>         *<a name="line.99"></a>
-<FONT color="green">100</FONT>         * @param ext the file name extension.<a name="line.100"></a>
-<FONT color="green">101</FONT>         * @param def the default type if none is found.<a name="line.101"></a>
-<FONT color="green">102</FONT>         * @return the MIME type.<a name="line.102"></a>
-<FONT color="green">103</FONT>         */<a name="line.103"></a>
-<FONT color="green">104</FONT>        public MimeType getMimeContentType(String ext,<a name="line.104"></a>
-<FONT color="green">105</FONT>                                           String def);<a name="line.105"></a>
-<FONT color="green">106</FONT>    <a name="line.106"></a>
-<FONT color="green">107</FONT>        /**<a name="line.107"></a>
-<FONT color="green">108</FONT>         * Gets the default file name extension for a MIME type.<a name="line.108"></a>
-<FONT color="green">109</FONT>         * Note that the mappers are called in the reverse order.<a name="line.109"></a>
-<FONT color="green">110</FONT>         *<a name="line.110"></a>
-<FONT color="green">111</FONT>         * @param type the MIME type as a string.<a name="line.111"></a>
-<FONT color="green">112</FONT>         * @return the file name extension or null.<a name="line.112"></a>
-<FONT color="green">113</FONT>         */<a name="line.113"></a>
-<FONT color="green">114</FONT>        public String getDefaultExtension(String type);<a name="line.114"></a>
-<FONT color="green">115</FONT>    <a name="line.115"></a>
-<FONT color="green">116</FONT>        /**<a name="line.116"></a>
-<FONT color="green">117</FONT>         * Gets the default file name extension for a MIME type.<a name="line.117"></a>
-<FONT color="green">118</FONT>         * Note that the mappers are called in the reverse order.<a name="line.118"></a>
-<FONT color="green">119</FONT>         *<a name="line.119"></a>
-<FONT color="green">120</FONT>         * @param mime the MIME type.<a name="line.120"></a>
-<FONT color="green">121</FONT>         * @return the file name extension or null.<a name="line.121"></a>
-<FONT color="green">122</FONT>         */<a name="line.122"></a>
-<FONT color="green">123</FONT>        public String getDefaultExtension(MimeType mime);<a name="line.123"></a>
-<FONT color="green">124</FONT>    <a name="line.124"></a>
-<FONT color="green">125</FONT>        /**<a name="line.125"></a>
-<FONT color="green">126</FONT>         * Sets a locale-charset mapping.<a name="line.126"></a>
-<FONT color="green">127</FONT>         *<a name="line.127"></a>
-<FONT color="green">128</FONT>         * @param key the key for the charset.<a name="line.128"></a>
-<FONT color="green">129</FONT>         * @param charset the corresponding charset.<a name="line.129"></a>
-<FONT color="green">130</FONT>         */<a name="line.130"></a>
-<FONT color="green">131</FONT>        public  void setCharSet(String key,<a name="line.131"></a>
-<FONT color="green">132</FONT>                                String charset);<a name="line.132"></a>
-<FONT color="green">133</FONT>    <a name="line.133"></a>
-<FONT color="green">134</FONT>        /**<a name="line.134"></a>
-<FONT color="green">135</FONT>         * Gets the charset for a locale. First a locale specific charset<a name="line.135"></a>
-<FONT color="green">136</FONT>         * is searched for, then a country specific one and lastly a language<a name="line.136"></a>
-<FONT color="green">137</FONT>         * specific one. If none is found, the default charset is returned.<a name="line.137"></a>
-<FONT color="green">138</FONT>         *<a name="line.138"></a>
-<FONT color="green">139</FONT>         * @param locale the locale.<a name="line.139"></a>
-<FONT color="green">140</FONT>         * @return the charset.<a name="line.140"></a>
-<FONT color="green">141</FONT>         */<a name="line.141"></a>
-<FONT color="green">142</FONT>        public String getCharSet(Locale locale);<a name="line.142"></a>
-<FONT color="green">143</FONT>    <a name="line.143"></a>
-<FONT color="green">144</FONT>        /**<a name="line.144"></a>
-<FONT color="green">145</FONT>         * Gets the charset for a locale with a variant. The search<a name="line.145"></a>
-<FONT color="green">146</FONT>         * is performed in the following order:<a name="line.146"></a>
-<FONT color="green">147</FONT>         * "lang"_"country"_"variant"="charset",<a name="line.147"></a>
-<FONT color="green">148</FONT>         * _"counry"_"variant"="charset",<a name="line.148"></a>
-<FONT color="green">149</FONT>         * "lang"__"variant"="charset",<a name="line.149"></a>
-<FONT color="green">150</FONT>         * __"variant"="charset",<a name="line.150"></a>
-<FONT color="green">151</FONT>         * "lang"_"country"="charset",<a name="line.151"></a>
-<FONT color="green">152</FONT>         * _"country"="charset",<a name="line.152"></a>
-<FONT color="green">153</FONT>         * "lang"="charset".<a name="line.153"></a>
-<FONT color="green">154</FONT>         * If nothing of the above is found, the default charset is returned.<a name="line.154"></a>
-<FONT color="green">155</FONT>         *<a name="line.155"></a>
-<FONT color="green">156</FONT>         * @param locale the locale.<a name="line.156"></a>
-<FONT color="green">157</FONT>         * @param variant a variant field.<a name="line.157"></a>
-<FONT color="green">158</FONT>         * @return the charset.<a name="line.158"></a>
-<FONT color="green">159</FONT>         */<a name="line.159"></a>
-<FONT color="green">160</FONT>        public String getCharSet(Locale locale,<a name="line.160"></a>
-<FONT color="green">161</FONT>                                 String variant);<a name="line.161"></a>
-<FONT color="green">162</FONT>    <a name="line.162"></a>
-<FONT color="green">163</FONT>        /**<a name="line.163"></a>
-<FONT color="green">164</FONT>         * Gets the charset for a specified key.<a name="line.164"></a>
-<FONT color="green">165</FONT>         *<a name="line.165"></a>
-<FONT color="green">166</FONT>         * @param key the key for the charset.<a name="line.166"></a>
-<FONT color="green">167</FONT>         * @return the found charset or the default one.<a name="line.167"></a>
-<FONT color="green">168</FONT>         */<a name="line.168"></a>
-<FONT color="green">169</FONT>        public String getCharSet(String key);<a name="line.169"></a>
-<FONT color="green">170</FONT>    <a name="line.170"></a>
-<FONT color="green">171</FONT>        /**<a name="line.171"></a>
-<FONT color="green">172</FONT>         * Gets the charset for a specified key.<a name="line.172"></a>
-<FONT color="green">173</FONT>         *<a name="line.173"></a>
-<FONT color="green">174</FONT>         * @param key the key for the charset.<a name="line.174"></a>
-<FONT color="green">175</FONT>         * @param def the default charset if none is found.<a name="line.175"></a>
-<FONT color="green">176</FONT>         * @return the found charset or the given default.<a name="line.176"></a>
-<FONT color="green">177</FONT>         */<a name="line.177"></a>
-<FONT color="green">178</FONT>        public String getCharSet(String key,<a name="line.178"></a>
-<FONT color="green">179</FONT>                                 String def);<a name="line.179"></a>
-<FONT color="green">180</FONT>    }<a name="line.180"></a>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<title>Source code</title>
+<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
+</head>
+<body>
+<div class="sourceContainer">
+<pre><span class="sourceLineNo">001</span>package org.apache.fulcrum.mimetype;<a name="line.1"></a>
+<span class="sourceLineNo">002</span><a name="line.2"></a>
+<span class="sourceLineNo">003</span>/*<a name="line.3"></a>
+<span class="sourceLineNo">004</span> * Licensed to the Apache Software Foundation (ASF) under one<a name="line.4"></a>
+<span class="sourceLineNo">005</span> * or more contributor license agreements.  See the NOTICE file<a name="line.5"></a>
+<span class="sourceLineNo">006</span> * distributed with this work for additional information<a name="line.6"></a>
+<span class="sourceLineNo">007</span> * regarding copyright ownership.  The ASF licenses this file<a name="line.7"></a>
+<span class="sourceLineNo">008</span> * to you under the Apache License, Version 2.0 (the<a name="line.8"></a>
+<span class="sourceLineNo">009</span> * "License"); you may not use this file except in compliance<a name="line.9"></a>
+<span class="sourceLineNo">010</span> * with the License.  You may obtain a copy of the License at<a name="line.10"></a>
+<span class="sourceLineNo">011</span> *<a name="line.11"></a>
+<span class="sourceLineNo">012</span> *   http://www.apache.org/licenses/LICENSE-2.0<a name="line.12"></a>
+<span class="sourceLineNo">013</span> *<a name="line.13"></a>
+<span class="sourceLineNo">014</span> * Unless required by applicable law or agreed to in writing,<a name="line.14"></a>
+<span class="sourceLineNo">015</span> * software distributed under the License is distributed on an<a name="line.15"></a>
+<span class="sourceLineNo">016</span> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY<a name="line.16"></a>
+<span class="sourceLineNo">017</span> * KIND, either express or implied.  See the License for the<a name="line.17"></a>
+<span class="sourceLineNo">018</span> * specific language governing permissions and limitations<a name="line.18"></a>
+<span class="sourceLineNo">019</span> * under the License.<a name="line.19"></a>
+<span class="sourceLineNo">020</span> */<a name="line.20"></a>
+<span class="sourceLineNo">021</span><a name="line.21"></a>
+<span class="sourceLineNo">022</span><a name="line.22"></a>
+<span class="sourceLineNo">023</span>import java.io.File;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import java.util.Locale;<a name="line.24"></a>
+<span class="sourceLineNo">025</span><a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.fulcrum.mimetype.util.MimeType;<a name="line.26"></a>
+<span class="sourceLineNo">027</span><a name="line.27"></a>
+<span class="sourceLineNo">028</span>/**<a name="line.28"></a>
+<span class="sourceLineNo">029</span> * The MimeType Service maintains mappings between MIME types and<a name="line.29"></a>
+<span class="sourceLineNo">030</span> * the corresponding file name extensions, and between locales and<a name="line.30"></a>
+<span class="sourceLineNo">031</span> * character encodings. The mappings are typically defined in<a name="line.31"></a>
+<span class="sourceLineNo">032</span> * properties or files located in user's home directory, Java home<a name="line.32"></a>
+<span class="sourceLineNo">033</span> * directory or the current class jar depending on the implementation.<a name="line.33"></a>
+<span class="sourceLineNo">034</span> *<a name="line.34"></a>
+<span class="sourceLineNo">035</span> * @author &lt;a href="mailto:ilkka.priha@simsoft.fi"&gt;Ilkka Priha&lt;/a&gt;<a name="line.35"></a>
+<span class="sourceLineNo">036</span> * @author &lt;a href="mailto:mcconnell@apache.org"&gt;Stephen McConnell&lt;/a&gt;<a name="line.36"></a>
+<span class="sourceLineNo">037</span> * @version $Id: MimeTypeService.java 1851387 2019-01-15 15:53:18Z painter $<a name="line.37"></a>
+<span class="sourceLineNo">038</span> */<a name="line.38"></a>
+<span class="sourceLineNo">039</span>public interface MimeTypeService<a name="line.39"></a>
+<span class="sourceLineNo">040</span>{<a name="line.40"></a>
+<span class="sourceLineNo">041</span>    /** Avalon role - used to id the component within the manager */<a name="line.41"></a>
+<span class="sourceLineNo">042</span>    String ROLE = MimeTypeService.class.getName();<a name="line.42"></a>
+<span class="sourceLineNo">043</span><a name="line.43"></a>
+<span class="sourceLineNo">044</span>    /**<a name="line.44"></a>
+<span class="sourceLineNo">045</span>     * Sets a MIME content type mapping to extensions to the map.<a name="line.45"></a>
+<span class="sourceLineNo">046</span>     * The extension is specified by a MIME type name followed<a name="line.46"></a>
+<span class="sourceLineNo">047</span>     * by a list of file name extensions separated by a whitespace.<a name="line.47"></a>
+<span class="sourceLineNo">048</span>     *<a name="line.48"></a>
+<span class="sourceLineNo">049</span>     * @param spec a MIME type extension specification to add.<a name="line.49"></a>
+<span class="sourceLineNo">050</span>     */<a name="line.50"></a>
+<span class="sourceLineNo">051</span>    public void setContentType(String spec);<a name="line.51"></a>
+<span class="sourceLineNo">052</span><a name="line.52"></a>
+<span class="sourceLineNo">053</span>    /**<a name="line.53"></a>
+<span class="sourceLineNo">054</span>     * Gets the MIME content type for a file as a string.<a name="line.54"></a>
+<span class="sourceLineNo">055</span>     *<a name="line.55"></a>
+<span class="sourceLineNo">056</span>     * @param file The file to look up a MIME type mapping for.<a name="line.56"></a>
+<span class="sourceLineNo">057</span>     * @return the MIME type string.<a name="line.57"></a>
+<span class="sourceLineNo">058</span>     */<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    public String getContentType(File file);<a name="line.59"></a>
+<span class="sourceLineNo">060</span><a name="line.60"></a>
+<span class="sourceLineNo">061</span>    /**<a name="line.61"></a>
+<span class="sourceLineNo">062</span>     * Gets the MIME content type for a named file as a string.<a name="line.62"></a>
+<span class="sourceLineNo">063</span>     *<a name="line.63"></a>
+<span class="sourceLineNo">064</span>     * @param fileName The name of the file to look up a MIME type<a name="line.64"></a>
+<span class="sourceLineNo">065</span>     * mapping for.<a name="line.65"></a>
+<span class="sourceLineNo">066</span>     * @return the MIME type string.<a name="line.66"></a>
+<span class="sourceLineNo">067</span>     */<a name="line.67"></a>
+<span class="sourceLineNo">068</span>    public String getContentType(String fileName);<a name="line.68"></a>
+<span class="sourceLineNo">069</span><a name="line.69"></a>
+<span class="sourceLineNo">070</span>    /**<a name="line.70"></a>
+<span class="sourceLineNo">071</span>     * Gets the MIME content type for a file name extension as a string.<a name="line.71"></a>
+<span class="sourceLineNo">072</span>     *<a name="line.72"></a>
+<span class="sourceLineNo">073</span>     * @param fileName The name of the file to look up a MIME type<a name="line.73"></a>
+<span class="sourceLineNo">074</span>     * mapping for.<a name="line.74"></a>
+<span class="sourceLineNo">075</span>     * @param def The default MIME type to use if no mapping exists.<a name="line.75"></a>
+<span class="sourceLineNo">076</span>     * @return the MIME type string.<a name="line.76"></a>
+<span class="sourceLineNo">077</span>     */<a name="line.77"></a>
+<span class="sourceLineNo">078</span>    public String getContentType(String fileName, String def);<a name="line.78"></a>
+<span class="sourceLineNo">079</span><a name="line.79"></a>
+<span class="sourceLineNo">080</span>    /**<a name="line.80"></a>
+<span class="sourceLineNo">081</span>     * Gets the MIME content type for a file.<a name="line.81"></a>
+<span class="sourceLineNo">082</span>     *<a name="line.82"></a>
+<span class="sourceLineNo">083</span>     * @param file the file.<a name="line.83"></a>
+<span class="sourceLineNo">084</span>     * @return the MIME type.<a name="line.84"></a>
+<span class="sourceLineNo">085</span>     */<a name="line.85"></a>
+<span class="sourceLineNo">086</span>    public MimeType getMimeContentType(File file);<a name="line.86"></a>
+<span class="sourceLineNo">087</span><a name="line.87"></a>
+<span class="sourceLineNo">088</span>    /**<a name="line.88"></a>
+<span class="sourceLineNo">089</span>     * Gets the MIME content type for a named file.<a name="line.89"></a>
+<span class="sourceLineNo">090</span>     *<a name="line.90"></a>
+<span class="sourceLineNo">091</span>     * @param name the name of the file.<a name="line.91"></a>
+<span class="sourceLineNo">092</span>     * @return the MIME type.<a name="line.92"></a>
+<span class="sourceLineNo">093</span>     */<a name="line.93"></a>
+<span class="sourceLineNo">094</span>    public MimeType getMimeContentType(String name);<a name="line.94"></a>
+<span class="sourceLineNo">095</span><a name="line.95"></a>
+<span class="sourceLineNo">096</span>    /**<a name="line.96"></a>
+<span class="sourceLineNo">097</span>     * Gets the MIME content type for a file name extension.<a name="line.97"></a>
+<span class="sourceLineNo">098</span>     *<a name="line.98"></a>
+<span class="sourceLineNo">099</span>     * @param ext the file name extension.<a name="line.99"></a>
+<span class="sourceLineNo">100</span>     * @param def the default type if none is found.<a name="line.100"></a>
+<span class="sourceLineNo">101</span>     * @return the MIME type.<a name="line.101"></a>
+<span class="sourceLineNo">102</span>     */<a name="line.102"></a>
+<span class="sourceLineNo">103</span>    public MimeType getMimeContentType(String ext,<a name="line.103"></a>
+<span class="sourceLineNo">104</span>                                       String def);<a name="line.104"></a>
+<span class="sourceLineNo">105</span><a name="line.105"></a>
+<span class="sourceLineNo">106</span>    /**<a name="line.106"></a>
+<span class="sourceLineNo">107</span>     * Gets the default file name extension for a MIME type.<a name="line.107"></a>
+<span class="sourceLineNo">108</span>     * Note that the mappers are called in the reverse order.<a name="line.108"></a>
+<span class="sourceLineNo">109</span>     *<a name="line.109"></a>
+<span class="sourceLineNo">110</span>     * @param type the MIME type as a string.<a name="line.110"></a>
+<span class="sourceLineNo">111</span>     * @return the file name extension or null.<a name="line.111"></a>
+<span class="sourceLineNo">112</span>     */<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    public String getDefaultExtension(String type);<a name="line.113"></a>
+<span class="sourceLineNo">114</span><a name="line.114"></a>
+<span class="sourceLineNo">115</span>    /**<a name="line.115"></a>
+<span class="sourceLineNo">116</span>     * Gets the default file name extension for a MIME type.<a name="line.116"></a>
+<span class="sourceLineNo">117</span>     * Note that the mappers are called in the reverse order.<a name="line.117"></a>
+<span class="sourceLineNo">118</span>     *<a name="line.118"></a>
+<span class="sourceLineNo">119</span>     * @param mime the MIME type.<a name="line.119"></a>
+<span class="sourceLineNo">120</span>     * @return the file name extension or null.<a name="line.120"></a>
+<span class="sourceLineNo">121</span>     */<a name="line.121"></a>
+<span class="sourceLineNo">122</span>    public String getDefaultExtension(MimeType mime);<a name="line.122"></a>
+<span class="sourceLineNo">123</span><a name="line.123"></a>
+<span class="sourceLineNo">124</span>    /**<a name="line.124"></a>
+<span class="sourceLineNo">125</span>     * Sets a locale-charset mapping.<a name="line.125"></a>
+<span class="sourceLineNo">126</span>     *<a name="line.126"></a>
+<span class="sourceLineNo">127</span>     * @param key the key for the charset.<a name="line.127"></a>
+<span class="sourceLineNo">128</span>     * @param charset the corresponding charset.<a name="line.128"></a>
+<span class="sourceLineNo">129</span>     */<a name="line.129"></a>
+<span class="sourceLineNo">130</span>    public  void setCharSet(String key,<a name="line.130"></a>
+<span class="sourceLineNo">131</span>                            String charset);<a name="line.131"></a>
+<span class="sourceLineNo">132</span><a name="line.132"></a>
+<span class="sourceLineNo">133</span>    /**<a name="line.133"></a>
+<span class="sourceLineNo">134</span>     * Gets the charset for a locale. First a locale specific charset<a name="line.134"></a>
+<span class="sourceLineNo">135</span>     * is searched for, then a country specific one and lastly a language<a name="line.135"></a>
+<span class="sourceLineNo">136</span>     * specific one. If none is found, the default charset is returned.<a name="line.136"></a>
+<span class="sourceLineNo">137</span>     *<a name="line.137"></a>
+<span class="sourceLineNo">138</span>     * @param locale the locale.<a name="line.138"></a>
+<span class="sourceLineNo">139</span>     * @return the charset.<a name="line.139"></a>
+<span class="sourceLineNo">140</span>     */<a name="line.140"></a>
+<span class="sourceLineNo">141</span>    public String getCharSet(Locale locale);<a name="line.141"></a>
+<span class="sourceLineNo">142</span><a name="line.142"></a>
+<span class="sourceLineNo">143</span>    /**<a name="line.143"></a>
+<span class="sourceLineNo">144</span>     * Gets the charset for a locale with a variant. The search<a name="line.144"></a>
+<span class="sourceLineNo">145</span>     * is performed in the following order:<a name="line.145"></a>
+<span class="sourceLineNo">146</span>     * "lang"_"country"_"variant"="charset",<a name="line.146"></a>
+<span class="sourceLineNo">147</span>     * _"counry"_"variant"="charset",<a name="line.147"></a>
+<span class="sourceLineNo">148</span>     * "lang"__"variant"="charset",<a name="line.148"></a>
+<span class="sourceLineNo">149</span>     * __"variant"="charset",<a name="line.149"></a>
+<span class="sourceLineNo">150</span>     * "lang"_"country"="charset",<a name="line.150"></a>
+<span class="sourceLineNo">151</span>     * _"country"="charset",<a name="line.151"></a>
+<span class="sourceLineNo">152</span>     * "lang"="charset".<a name="line.152"></a>
+<span class="sourceLineNo">153</span>     * If nothing of the above is found, the default charset is returned.<a name="line.153"></a>
+<span class="sourceLineNo">154</span>     *<a name="line.154"></a>
+<span class="sourceLineNo">155</span>     * @param locale the locale.<a name="line.155"></a>
+<span class="sourceLineNo">156</span>     * @param variant a variant field.<a name="line.156"></a>
+<span class="sourceLineNo">157</span>     * @return the charset.<a name="line.157"></a>
+<span class="sourceLineNo">158</span>     */<a name="line.158"></a>
+<span class="sourceLineNo">159</span>    public String getCharSet(Locale locale,<a name="line.159"></a>
+<span class="sourceLineNo">160</span>                             String variant);<a name="line.160"></a>
+<span class="sourceLineNo">161</span><a name="line.161"></a>
+<span class="sourceLineNo">162</span>    /**<a name="line.162"></a>
+<span class="sourceLineNo">163</span>     * Gets the charset for a specified key.<a name="line.163"></a>
+<span class="sourceLineNo">164</span>     *<a name="line.164"></a>
+<span class="sourceLineNo">165</span>     * @param key the key for the charset.<a name="line.165"></a>
+<span class="sourceLineNo">166</span>     * @return the found charset or the default one.<a name="line.166"></a>
+<span class="sourceLineNo">167</span>     */<a name="line.167"></a>
+<span class="sourceLineNo">168</span>    public String getCharSet(String key);<a name="line.168"></a>
+<span class="sourceLineNo">169</span><a name="line.169"></a>
+<span class="sourceLineNo">170</span>    /**<a name="line.170"></a>
+<span class="sourceLineNo">171</span>     * Gets the charset for a specified key.<a name="line.171"></a>
+<span class="sourceLineNo">172</span>     *<a name="line.172"></a>
+<span class="sourceLineNo">173</span>     * @param key the key for the charset.<a name="line.173"></a>
+<span class="sourceLineNo">174</span>     * @param def the default charset if none is found.<a name="line.174"></a>
+<span class="sourceLineNo">175</span>     * @return the found charset or the given default.<a name="line.175"></a>
+<span class="sourceLineNo">176</span>     */<a name="line.176"></a>
+<span class="sourceLineNo">177</span>    public String getCharSet(String key,<a name="line.177"></a>
+<span class="sourceLineNo">178</span>                             String def);<a name="line.178"></a>
+<span class="sourceLineNo">179</span>}<a name="line.179"></a>
 
 
 
@@ -241,6 +245,7 @@
 
 
 
-</PRE>
-</BODY>
-</HTML>
+</pre>
+</div>
+</body>
+</html>
\ No newline at end of file