📄 charsetmap.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Dec 06 19:57:08 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class CharSetMap</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.turbine.services.mimetype.util</FONT><BR>Class CharSetMap</H2><PRE>java.lang.Object | +--<B>org.apache.turbine.services.mimetype.util.CharSetMap</B></PRE><HR><DL><DT>public class <B>CharSetMap</B><DT>extends java.lang.Object</DL><P>This class maintains a set of mappers defining mappings between locales and the corresponding charsets. The mappings are defined as properties between locale and charset names. The definitions can be listed in property files located in user's home directory, Java home directory or the current class jar. In addition, this class maintains static default mappings and constructors support application specific mappings.<P><DL><DT><B>Version: </B><DD>$Id: CharSetMap.java,v 1.1.1.1 2001/08/16 05:09:07 jvanzyl Exp $</DD><DT><B>Author: </B><DD><a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#CHARSET_RESOURCE">CHARSET_RESOURCE</A></B></CODE><BR> The name for charset mapper resources.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#DEFAULT_CHARSET">DEFAULT_CHARSET</A></B></CODE><BR> The default charset when nothing else is applicable.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#CharSetMap()">CharSetMap</A></B>()</CODE><BR> Constructs a new charset map with default mappers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#CharSetMap(java.io.File)">CharSetMap</A></B>(java.io.File file)</CODE><BR> Contructs a charset map read from a property file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#CharSetMap(java.io.InputStream)">CharSetMap</A></B>(java.io.InputStream input)</CODE><BR> Contructs a charset map read from a stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#CharSetMap(java.util.Properties)">CharSetMap</A></B>(java.util.Properties props)</CODE><BR> Contructs a charset map from properties.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#CharSetMap(java.lang.String)">CharSetMap</A></B>(java.lang.String path)</CODE><BR> Contructs a charset map read from a property file path.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#getCharSet(java.util.Locale)">getCharSet</A></B>(java.util.Locale locale)</CODE><BR> Gets the charset for a locale.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#getCharSet(java.util.Locale, java.lang.String)">getCharSet</A></B>(java.util.Locale locale, java.lang.String variant)</CODE><BR> Gets the charset for a locale with a variant.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#getCharSet(java.lang.String)">getCharSet</A></B>(java.lang.String key)</CODE><BR> Gets the charset for a specified key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#getCharSet(java.lang.String, java.lang.String)">getCharSet</A></B>(java.lang.String key, java.lang.String def)</CODE><BR> Gets the charset for a specified key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static java.util.Map</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#loadFile(java.io.File)">loadFile</A></B>(java.io.File file)</CODE><BR> Loads mappings from a file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static java.util.Map</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#loadPath(java.lang.String)">loadPath</A></B>(java.lang.String path)</CODE><BR> Loads mappings from a file path.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static java.util.Map</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#loadResource(java.lang.String)">loadResource</A></B>(java.lang.String name)</CODE><BR> Loads mappings from a resource.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static java.util.Map</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#loadStream(java.io.InputStream)">loadStream</A></B>(java.io.InputStream input)</CODE><BR> Loads mappings from a stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#setCharSet(java.lang.String, java.lang.String)">setCharSet</A></B>(java.lang.String key, java.lang.String charset)</CODE><BR> Sets a locale-charset mapping.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../org/apache/turbine/services/mimetype/util/CharSetMap.html#setCommonCharSet(java.lang.String, java.lang.String)">setCommonCharSet</A></B>(java.lang.String key, java.lang.String charset)</CODE><BR> Sets a common locale-charset mapping.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -