📄 charsetmap.html
字号:
</TABLE><A NAME="DEFAULT_CHARSET"><!-- --></A><H3>DEFAULT_CHARSET</H3><PRE>public static final java.lang.String <B>DEFAULT_CHARSET</B></PRE><DL><DD>The default charset when nothing else is applicable.</DL><HR><A NAME="CHARSET_RESOURCE"><!-- --></A><H3>CHARSET_RESOURCE</H3><PRE>public static final java.lang.String <B>CHARSET_RESOURCE</B></PRE><DL><DD>The name for charset mapper resources.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="CharSetMap()"><!-- --></A><H3>CharSetMap</H3><PRE>public <B>CharSetMap</B>()</PRE><DL><DD>Constructs a new charset map with default mappers.</DL><HR><A NAME="CharSetMap(java.util.Properties)"><!-- --></A><H3>CharSetMap</H3><PRE>public <B>CharSetMap</B>(java.util.Properties props)</PRE><DL><DD>Contructs a charset map from properties.<DD><DL><DT><B>Parameters:</B><DD><CODE>props</CODE> - charset mapping propeties.</DL></DD></DL><HR><A NAME="CharSetMap(java.io.InputStream)"><!-- --></A><H3>CharSetMap</H3><PRE>public <B>CharSetMap</B>(java.io.InputStream input) throws java.io.IOException</PRE><DL><DD>Contructs a charset map read from a stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>input</CODE> - an input stream.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - for an incorrect stream.</DL></DD></DL><HR><A NAME="CharSetMap(java.io.File)"><!-- --></A><H3>CharSetMap</H3><PRE>public <B>CharSetMap</B>(java.io.File file) throws java.io.IOException</PRE><DL><DD>Contructs a charset map read from a property file.<DD><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - a property file.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - for an incorrect property file.</DL></DD></DL><HR><A NAME="CharSetMap(java.lang.String)"><!-- --></A><H3>CharSetMap</H3><PRE>public <B>CharSetMap</B>(java.lang.String path) throws java.io.IOException</PRE><DL><DD>Contructs a charset map read from a property file path.<DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - a property file path.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - for an incorrect property file.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="loadStream(java.io.InputStream)"><!-- --></A><H3>loadStream</H3><PRE>protected static java.util.Map <B>loadStream</B>(java.io.InputStream input) throws java.io.IOException</PRE><DL><DD>Loads mappings from a stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>input</CODE> - an input stream.<DT><B>Returns:</B><DD>the mappings.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - for an incorrect stream.</DL></DD></DL><HR><A NAME="loadFile(java.io.File)"><!-- --></A><H3>loadFile</H3><PRE>protected static java.util.Map <B>loadFile</B>(java.io.File file) throws java.io.IOException</PRE><DL><DD>Loads mappings from a file.<DD><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - a file.<DT><B>Returns:</B><DD>the mappings.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - for an incorrect file.</DL></DD></DL><HR><A NAME="loadPath(java.lang.String)"><!-- --></A><H3>loadPath</H3><PRE>protected static java.util.Map <B>loadPath</B>(java.lang.String path) throws java.io.IOException</PRE><DL><DD>Loads mappings from a file path.<DD><DL><DT><B>Parameters:</B><DD><CODE>path</CODE> - a file path.<DT><B>Returns:</B><DD>the mappings.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - for an incorrect file.</DL></DD></DL><HR><A NAME="loadResource(java.lang.String)"><!-- --></A><H3>loadResource</H3><PRE>protected static java.util.Map <B>loadResource</B>(java.lang.String name)</PRE><DL><DD>Loads mappings from a resource.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - a resource name.<DT><B>Returns:</B><DD>the mappings.</DL></DD></DL><HR><A NAME="setCharSet(java.lang.String, java.lang.String)"><!-- --></A><H3>setCharSet</H3><PRE>public void <B>setCharSet</B>(java.lang.String key, java.lang.String charset)</PRE><DL><DD>Sets a locale-charset mapping.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key for the charset.<DD><CODE>charset</CODE> - the corresponding charset.</DL></DD></DL><HR><A NAME="getCharSet(java.util.Locale)"><!-- --></A><H3>getCharSet</H3><PRE>public java.lang.String <B>getCharSet</B>(java.util.Locale locale)</PRE><DL><DD>Gets the charset for a locale. First a locale specific charset is searched for, then a country specific one and lastly a language specific one. If none is found, the default charset is returned.<DD><DL><DT><B>Parameters:</B><DD><CODE>locale</CODE> - the locale.<DT><B>Returns:</B><DD>the charset.</DL></DD></DL><HR><A NAME="getCharSet(java.util.Locale, java.lang.String)"><!-- --></A><H3>getCharSet</H3><PRE>public java.lang.String <B>getCharSet</B>(java.util.Locale locale, java.lang.String variant)</PRE><DL><DD>Gets the charset for a locale with a variant. The search is performed in the following order: "lang"_"country"_"variant"="charset", _"counry"_"variant"="charset", "lang"__"variant"="charset", __"variant"="charset", "lang"_"country"="charset", _"country"="charset", "lang"="charset". If nothing of the above is found, the default charset is returned.<DD><DL><DT><B>Parameters:</B><DD><CODE>locale</CODE> - the locale.<DD><CODE>variant</CODE> - a variant field.<DT><B>Returns:</B><DD>the charset.</DL></DD></DL><HR><A NAME="getCharSet(java.lang.String)"><!-- --></A><H3>getCharSet</H3><PRE>public java.lang.String <B>getCharSet</B>(java.lang.String key)</PRE><DL><DD>Gets the charset for a specified key.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key for the charset.<DT><B>Returns:</B><DD>the found charset or the default one.</DL></DD></DL><HR><A NAME="getCharSet(java.lang.String, java.lang.String)"><!-- --></A><H3>getCharSet</H3><PRE>public java.lang.String <B>getCharSet</B>(java.lang.String key, java.lang.String def)</PRE><DL><DD>Gets the charset for a specified key.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key for the charset.<DD><CODE>def</CODE> - the default charset if none is found.<DT><B>Returns:</B><DD>the found charset or the given default.</DL></DD></DL><HR><A NAME="setCommonCharSet(java.lang.String, java.lang.String)"><!-- --></A><H3>setCommonCharSet</H3><PRE>protected void <B>setCommonCharSet</B>(java.lang.String key, java.lang.String charset)</PRE><DL><DD>Sets a common locale-charset mapping.<DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the key for the charset.<DD><CODE>charset</CODE> - the corresponding charset.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CharSetMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../../../../org/apache/turbine/services/mimetype/util/MimeType.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="CharSetMap.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR>Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -