blob: c1d51484bfb91d9302a4230299f5727cfb4db9ec [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_18) on Sun Apr 01 21:18:35 PDT 2012 -->
<TITLE>
CharInfo
</TITLE>
<META NAME="keywords" CONTENT="org.apache.xml.serializer.CharInfo class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="CharInfo";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CharInfo.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xml/serializer/AttributesImplSerializer.html" title="class in org.apache.xml.serializer"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/serializer/CharInfo.CharKey.html" title="class in org.apache.xml.serializer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/xml/serializer/CharInfo.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CharInfo.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xml.serializer</FONT>
<BR>
Class CharInfo</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xml.serializer.CharInfo</B>
</PRE>
<HR>
<DL>
<DT><PRE>final class <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.53"><B>CharInfo</B></A><DT>extends java.lang.Object</DL>
</PRE>
<P>
This class provides services that tell if a character should have
special treatement, such as entity reference substitution or normalization
of a newline character. It also provides character to entity reference
lookup.
DEVELOPERS: See Known Issue in the constructor.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.CharKey.html" title="class in org.apache.xml.serializer">CharInfo.CharKey</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simple class for fast lookup of char values, when used with
hashtables.</TD>
</TR>
</TABLE>
&nbsp;<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#array_of_bits">array_of_bits</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An array of bits to record if the character is in the set.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#ASCII_MAX">ASCII_MAX</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy the first 0,1 ...</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#firstWordNotUsed">firstWordNotUsed</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#HTML_ENTITIES_RESOURCE">HTML_ENTITIES_RESOURCE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The name of the HTML entities file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#LOW_ORDER_BITMASK">LOW_ORDER_BITMASK</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="../../../../org/apache/xml/serializer/CharInfo.CharKey.html" title="class in org.apache.xml.serializer">CharInfo.CharKey</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#m_charKey">m_charKey</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A utility object, just used to map characters to output Strings,
needed because a HashMap needs to map an object as a key, not a
Java primitive type, like a char, so this object gets around that
and it is reusable.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.util.HashMap</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#m_charToString">m_charToString</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given a character, lookup a String to output (e.g.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#m_getCharInfoCache">m_getCharInfoCache</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Table of user-specified char infos.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#onlyQuotAmpLtGt">onlyQuotAmpLtGt</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This flag is an optimization for HTML entities.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_CARRIAGERETURN">S_CARRIAGERETURN</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The carriage return character, which the parser should always normalize.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_GT">S_GT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_HORIZONAL_TAB">S_HORIZONAL_TAB</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The horizontal tab character, which the parser should always normalize.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_LINE_SEPARATOR">S_LINE_SEPARATOR</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_LINEFEED">S_LINEFEED</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The linefeed character, which the parser should always normalize.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_LT">S_LT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_NEL">S_NEL</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_QUOTE">S_QUOTE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#S_SPACE">S_SPACE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#SHIFT_PER_WORD">SHIFT_PER_WORD</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;boolean[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#shouldMapAttrChar_ASCII">shouldMapAttrChar_ASCII</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Array of values is faster access than a set of bits
to quickly check ASCII characters in attribute values,
the value is true if the character in an attribute value
should be mapped to a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;boolean[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#shouldMapTextChar_ASCII">shouldMapTextChar_ASCII</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Array of values is faster access than a set of bits
to quickly check ASCII characters in text nodes,
the value is true if the character in a text node
should be mapped to a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#XML_ENTITIES_RESOURCE">XML_ENTITIES_RESOURCE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The name of the XML entities file.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#CharInfo()">CharInfo</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A base constructor just to explicitly create the fields,
with the exception of m_charToString which is handled
by the constructor that delegates base construction to this one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#CharInfo(java.lang.String, java.lang.String, boolean)">CharInfo</A></B>(java.lang.String&nbsp;entitiesResource,
java.lang.String&nbsp;method,
boolean&nbsp;internal)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#arrayIndex(int)">arrayIndex</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the array element holding the bit value for the
given integer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#bit(int)">bit</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For a given integer in the set it returns the single bit
value used within a given word that represents whether
the integer is in the set or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#createEmptySetOfIntegers(int)">createEmptySetOfIntegers</A></B>(int&nbsp;max)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new empty set of integers (characters)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#defineChar2StringMapping(java.lang.String, char)">defineChar2StringMapping</A></B>(java.lang.String&nbsp;outputString,
char&nbsp;inputChar)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call this method to register a char to String mapping, for example
to map '<' to "&lt;".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#defineEntity(java.lang.String, char)">defineEntity</A></B>(java.lang.String&nbsp;name,
char&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defines a new character reference.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#extraEntity(java.lang.String, int)">extraEntity</A></B>(java.lang.String&nbsp;outputString,
int&nbsp;charToMap)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method returns true if there are some non-standard mappings to
entities other than quot, amp, lt, gt, and its only purpose is for
performance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#get(int)">get</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if the integer (character)is in the set of integers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;<A HREF="../../../../org/apache/xml/serializer/CharInfo.html" title="class in org.apache.xml.serializer">CharInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#getCharInfo(java.lang.String, java.lang.String)">getCharInfo</A></B>(java.lang.String&nbsp;entitiesFileName,
java.lang.String&nbsp;method)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Factory that reads in a resource file that describes the mapping of
characters to entity references.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;<A HREF="../../../../org/apache/xml/serializer/CharInfo.html" title="class in org.apache.xml.serializer">CharInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#getCharInfoBasedOnPrivilege(java.lang.String, java.lang.String, boolean)">getCharInfoBasedOnPrivilege</A></B>(java.lang.String&nbsp;entitiesFileName,
java.lang.String&nbsp;method,
boolean&nbsp;internal)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#getOutputStringForChar(char)">getOutputStringForChar</A></B>(char&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map a character to a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;<A HREF="../../../../org/apache/xml/serializer/CharInfo.html" title="class in org.apache.xml.serializer">CharInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#mutableCopyOf(org.apache.xml.serializer.CharInfo)">mutableCopyOf</A></B>(<A HREF="../../../../org/apache/xml/serializer/CharInfo.html" title="class in org.apache.xml.serializer">CharInfo</A>&nbsp;charInfo)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a mutable copy of the cached one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#set(int)">set</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the integer (character) to the set of integers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#setASCIIattrDirty(int)">setASCIIattrDirty</A></B>(int&nbsp;j)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the character is in the ASCII range then
mark it as needing replacement with
a String on output if it occurs in a attribute value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#setASCIItextDirty(int)">setASCIItextDirty</A></B>(int&nbsp;j)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the character is in the ASCII range then
mark it as needing replacement with
a String on output if it occurs in a text node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#shouldMapAttrChar(int)">shouldMapAttrChar</A></B>(int&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tell if the character argument that is from
an attribute value has a mapping to a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/CharInfo.html#shouldMapTextChar(int)">shouldMapTextChar</A></B>(int&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tell if the character argument that is from a
text node has a mapping to a String, for example
to map '<' to "&lt;".</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="m_charToString"><!-- --></A><H3>
m_charToString</H3>
<PRE>
private java.util.HashMap <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.56"><B>m_charToString</B></A></PRE>
<DL>
<DD>Given a character, lookup a String to output (e.g. a decorated entity reference).
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="HTML_ENTITIES_RESOURCE"><!-- --></A><H3>
HTML_ENTITIES_RESOURCE</H3>
<PRE>
public static final java.lang.String <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.62"><B>HTML_ENTITIES_RESOURCE</B></A></PRE>
<DL>
<DD>The name of the HTML entities file.
If specified, the file will be resource loaded with the default class loader.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="XML_ENTITIES_RESOURCE"><!-- --></A><H3>
XML_ENTITIES_RESOURCE</H3>
<PRE>
public static final java.lang.String <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.69"><B>XML_ENTITIES_RESOURCE</B></A></PRE>
<DL>
<DD>The name of the XML entities file.
If specified, the file will be resource loaded with the default class loader.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="S_HORIZONAL_TAB"><!-- --></A><H3>
S_HORIZONAL_TAB</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.73"><B>S_HORIZONAL_TAB</B></A></PRE>
<DL>
<DD>The horizontal tab character, which the parser should always normalize.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_HORIZONAL_TAB">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="S_LINEFEED"><!-- --></A><H3>
S_LINEFEED</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.76"><B>S_LINEFEED</B></A></PRE>
<DL>
<DD>The linefeed character, which the parser should always normalize.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_LINEFEED">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="S_CARRIAGERETURN"><!-- --></A><H3>
S_CARRIAGERETURN</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.79"><B>S_CARRIAGERETURN</B></A></PRE>
<DL>
<DD>The carriage return character, which the parser should always normalize.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_CARRIAGERETURN">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="S_SPACE"><!-- --></A><H3>
S_SPACE</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.80"><B>S_SPACE</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_SPACE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="S_QUOTE"><!-- --></A><H3>
S_QUOTE</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.81"><B>S_QUOTE</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_QUOTE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="S_LT"><!-- --></A><H3>
S_LT</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.82"><B>S_LT</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_LT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="S_GT"><!-- --></A><H3>
S_GT</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.83"><B>S_GT</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_GT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="S_NEL"><!-- --></A><H3>
S_NEL</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.84"><B>S_NEL</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_NEL">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="S_LINE_SEPARATOR"><!-- --></A><H3>
S_LINE_SEPARATOR</H3>
<PRE>
static final char <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.85"><B>S_LINE_SEPARATOR</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.S_LINE_SEPARATOR">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="onlyQuotAmpLtGt"><!-- --></A><H3>
onlyQuotAmpLtGt</H3>
<PRE>
boolean <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.92"><B>onlyQuotAmpLtGt</B></A></PRE>
<DL>
<DD>This flag is an optimization for HTML entities. It false if entities
other than quot (34), amp (38), lt (60) and gt (62) are defined
in the range 0 to 127.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="ASCII_MAX"><!-- --></A><H3>
ASCII_MAX</H3>
<PRE>
static final int <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.95"><B>ASCII_MAX</B></A></PRE>
<DL>
<DD>Copy the first 0,1 ... ASCII_MAX values into an array
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.ASCII_MAX">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="shouldMapAttrChar_ASCII"><!-- --></A><H3>
shouldMapAttrChar_ASCII</H3>
<PRE>
private final boolean[] <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.102"><B>shouldMapAttrChar_ASCII</B></A></PRE>
<DL>
<DD>Array of values is faster access than a set of bits
to quickly check ASCII characters in attribute values,
the value is true if the character in an attribute value
should be mapped to a String.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="shouldMapTextChar_ASCII"><!-- --></A><H3>
shouldMapTextChar_ASCII</H3>
<PRE>
private final boolean[] <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.109"><B>shouldMapTextChar_ASCII</B></A></PRE>
<DL>
<DD>Array of values is faster access than a set of bits
to quickly check ASCII characters in text nodes,
the value is true if the character in a text node
should be mapped to a String.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="array_of_bits"><!-- --></A><H3>
array_of_bits</H3>
<PRE>
private final int[] <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.116"><B>array_of_bits</B></A></PRE>
<DL>
<DD>An array of bits to record if the character is in the set.
Although information in this array is complete, the
isSpecialAttrASCII array is used first because access to its values
is common and faster.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="SHIFT_PER_WORD"><!-- --></A><H3>
SHIFT_PER_WORD</H3>
<PRE>
private static final int <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.125"><B>SHIFT_PER_WORD</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.SHIFT_PER_WORD">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="LOW_ORDER_BITMASK"><!-- --></A><H3>
LOW_ORDER_BITMASK</H3>
<PRE>
private static final int <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.136"><B>LOW_ORDER_BITMASK</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.serializer.CharInfo.LOW_ORDER_BITMASK">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="firstWordNotUsed"><!-- --></A><H3>
firstWordNotUsed</H3>
<PRE>
private int <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.143"><B>firstWordNotUsed</B></A></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_charKey"><!-- --></A><H3>
m_charKey</H3>
<PRE>
private final <A HREF="../../../../org/apache/xml/serializer/CharInfo.CharKey.html" title="class in org.apache.xml.serializer">CharInfo.CharKey</A> <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.381"><B>m_charKey</B></A></PRE>
<DL>
<DD>A utility object, just used to map characters to output Strings,
needed because a HashMap needs to map an object as a key, not a
Java primitive type, like a char, so this object gets around that
and it is reusable.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_getCharInfoCache"><!-- --></A><H3>
m_getCharInfoCache</H3>
<PRE>
private static java.util.Hashtable <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.565"><B>m_getCharInfoCache</B></A></PRE>
<DL>
<DD>Table of user-specified char infos.
The table maps entify file names (the name of the
property file without the .properties extension)
to CharInfo objects populated with entities defined in
corresponding property file.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="CharInfo()"><!-- --></A><H3>
CharInfo</H3>
<PRE>
private <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.156"><B>CharInfo</B></A>()</PRE>
<DL>
<DD>A base constructor just to explicitly create the fields,
with the exception of m_charToString which is handled
by the constructor that delegates base construction to this one.
<p>
m_charToString is not created here only for performance reasons,
to avoid creating a Hashtable that will be replaced when
making a mutable copy, <A HREF="../../../../org/apache/xml/serializer/CharInfo.html#mutableCopyOf(org.apache.xml.serializer.CharInfo)"><CODE>mutableCopyOf(CharInfo)</CODE></A>.
<P>
</DL>
<HR>
<A NAME="CharInfo(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
CharInfo</H3>
<PRE>
private <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.173"><B>CharInfo</B></A>(java.lang.String&nbsp;entitiesResource,
java.lang.String&nbsp;method,
boolean&nbsp;internal)</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="defineEntity(java.lang.String, char)"><!-- --></A><H3>
defineEntity</H3>
<PRE>
private boolean <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.364"><B>defineEntity</B></A>(java.lang.String&nbsp;name,
char&nbsp;value)</PRE>
<DL>
<DD>Defines a new character reference. The reference's name and value are
supplied. Nothing happens if the character reference is already defined.
<p>Unlike internal entities, character references are a string to single
character mapping. They are used to map non-ASCII characters both on
parsing and printing, primarily for HTML documents. '&amp;lt;' is an
example of a character reference.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The entity's name<DD><CODE>value</CODE> - The entity's value
<DT><B>Returns:</B><DD>true if the mapping is not one of:
<ul>
<li> '<' to "&lt;"
<li> '>' to "&gt;"
<li> '&' to "&amp;"
<li> '"' to "&quot;"
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="getOutputStringForChar(char)"><!-- --></A><H3>
getOutputStringForChar</H3>
<PRE>
java.lang.String <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.405"><B>getOutputStringForChar</B></A>(char&nbsp;value)</PRE>
<DL>
<DD>Map a character to a String. For example given
the character '>' this method would return the fully decorated
entity name "&lt;".
Strings for entity references are loaded from a properties file,
but additional mappings defined through calls to defineChar2String()
are possible. Such entity reference mappings could be over-ridden.
This is reusing a stored key object, in an effort to avoid
heap activity. Unfortunately, that introduces a threading risk.
Simplest fix for now is to make it a synchronized method, or to give
up the reuse; I see very little performance difference between them.
Long-term solution would be to replace the hashtable with a sparse array
keyed directly from the character's integer value; see DTM's
string pool for a related solution.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The character that should be resolved to
a String, e.g. resolve '>' to "&lt;".
<DT><B>Returns:</B><DD>The String that the character is mapped to, or null if not found.</DL>
</DD>
</DL>
<HR>
<A NAME="shouldMapAttrChar(int)"><!-- --></A><H3>
shouldMapAttrChar</H3>
<PRE>
final boolean <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.421"><B>shouldMapAttrChar</B></A>(int&nbsp;value)</PRE>
<DL>
<DD>Tell if the character argument that is from
an attribute value has a mapping to a String.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the value of a character that is in an attribute value
<DT><B>Returns:</B><DD>true if the character should have any special treatment,
such as when writing out entity references.</DL>
</DD>
</DL>
<HR>
<A NAME="shouldMapTextChar(int)"><!-- --></A><H3>
shouldMapTextChar</H3>
<PRE>
final boolean <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.444"><B>shouldMapTextChar</B></A>(int&nbsp;value)</PRE>
<DL>
<DD>Tell if the character argument that is from a
text node has a mapping to a String, for example
to map '<' to "&lt;".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the value of a character that is in a text node
<DT><B>Returns:</B><DD>true if the character has a mapping to a String,
such as when writing out entity references.</DL>
</DD>
</DL>
<HR>
<A NAME="getCharInfoBasedOnPrivilege(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
getCharInfoBasedOnPrivilege</H3>
<PRE>
private static <A HREF="../../../../org/apache/xml/serializer/CharInfo.html" title="class in org.apache.xml.serializer">CharInfo</A> <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.459"><B>getCharInfoBasedOnPrivilege</B></A>(java.lang.String&nbsp;entitiesFileName,
java.lang.String&nbsp;method,
boolean&nbsp;internal)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCharInfo(java.lang.String, java.lang.String)"><!-- --></A><H3>
getCharInfo</H3>
<PRE>
static <A HREF="../../../../org/apache/xml/serializer/CharInfo.html" title="class in org.apache.xml.serializer">CharInfo</A> <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.489"><B>getCharInfo</B></A>(java.lang.String&nbsp;entitiesFileName,
java.lang.String&nbsp;method)</PRE>
<DL>
<DD>Factory that reads in a resource file that describes the mapping of
characters to entity references.
Resource files must be encoded in UTF-8 and have a format like:
<pre>
# First char # is a comment
Entity numericValue
quot 34
amp 38
</pre>
(Note: Why don't we just switch to .properties files? Oct-01 -sc)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>entitiesResource</CODE> - Name of entities resource file that should
be loaded, which describes that mapping of characters to entity references.<DD><CODE>method</CODE> - the output method type, which should be one of "xml", "html", "text"...</DL>
</DD>
</DL>
<HR>
<A NAME="mutableCopyOf(org.apache.xml.serializer.CharInfo)"><!-- --></A><H3>
mutableCopyOf</H3>
<PRE>
private static <A HREF="../../../../org/apache/xml/serializer/CharInfo.html" title="class in org.apache.xml.serializer">CharInfo</A> <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.535"><B>mutableCopyOf</B></A>(<A HREF="../../../../org/apache/xml/serializer/CharInfo.html" title="class in org.apache.xml.serializer">CharInfo</A>&nbsp;charInfo)</PRE>
<DL>
<DD>Create a mutable copy of the cached one.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>charInfo</CODE> - The cached one.
<DT><B>Returns:</B><DD></DL>
</DD>
</DL>
<HR>
<A NAME="arrayIndex(int)"><!-- --></A><H3>
arrayIndex</H3>
<PRE>
private static int <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.573"><B>arrayIndex</B></A>(int&nbsp;i)</PRE>
<DL>
<DD>Returns the array element holding the bit value for the
given integer
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the integer that might be in the set of integers</DL>
</DD>
</DL>
<HR>
<A NAME="bit(int)"><!-- --></A><H3>
bit</H3>
<PRE>
private static int <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.582"><B>bit</B></A>(int&nbsp;i)</PRE>
<DL>
<DD>For a given integer in the set it returns the single bit
value used within a given word that represents whether
the integer is in the set or not.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="createEmptySetOfIntegers(int)"><!-- --></A><H3>
createEmptySetOfIntegers</H3>
<PRE>
private int[] <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.591"><B>createEmptySetOfIntegers</B></A>(int&nbsp;max)</PRE>
<DL>
<DD>Creates a new empty set of integers (characters)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>max</CODE> - the maximum integer to be in the set.</DL>
</DD>
</DL>
<HR>
<A NAME="set(int)"><!-- --></A><H3>
set</H3>
<PRE>
private final void <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.605"><B>set</B></A>(int&nbsp;i)</PRE>
<DL>
<DD>Adds the integer (character) to the set of integers.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the integer to add to the set, valid values are
0, 1, 2 ... up to the maximum that was specified at
the creation of the set.</DL>
</DD>
</DL>
<HR>
<A NAME="get(int)"><!-- --></A><H3>
get</H3>
<PRE>
private final boolean <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.629"><B>get</B></A>(int&nbsp;i)</PRE>
<DL>
<DD>Return true if the integer (character)is in the set of integers.
This implementation uses an array of integers with 32 bits per
integer. If a bit is set to 1 the corresponding integer is
in the set of integers.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - an integer that is tested to see if it is the
set of integers, or not.</DL>
</DD>
</DL>
<HR>
<A NAME="extraEntity(java.lang.String, int)"><!-- --></A><H3>
extraEntity</H3>
<PRE>
private boolean <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.657"><B>extraEntity</B></A>(java.lang.String&nbsp;outputString,
int&nbsp;charToMap)</PRE>
<DL>
<DD>This method returns true if there are some non-standard mappings to
entities other than quot, amp, lt, gt, and its only purpose is for
performance.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>charToMap</CODE> - The value of the character that is mapped to a String<DD><CODE>outputString</CODE> - The String to which the character is mapped, usually
an entity reference such as "&lt;".
<DT><B>Returns:</B><DD>true if the mapping is not one of:
<ul>
<li> '<' to "&lt;"
<li> '>' to "&gt;"
<li> '&' to "&amp;"
<li> '"' to "&quot;"
</ul></DL>
</DD>
</DL>
<HR>
<A NAME="setASCIItextDirty(int)"><!-- --></A><H3>
setASCIItextDirty</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.693"><B>setASCIItextDirty</B></A>(int&nbsp;j)</PRE>
<DL>
<DD>If the character is in the ASCII range then
mark it as needing replacement with
a String on output if it occurs in a text node.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="setASCIIattrDirty(int)"><!-- --></A><H3>
setASCIIattrDirty</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.707"><B>setASCIIattrDirty</B></A>(int&nbsp;j)</PRE>
<DL>
<DD>If the character is in the ASCII range then
mark it as needing replacement with
a String on output if it occurs in a attribute value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="defineChar2StringMapping(java.lang.String, char)"><!-- --></A><H3>
defineChar2StringMapping</H3>
<PRE>
boolean <A HREF="../../../../src-html/org/apache/xml/serializer/CharInfo.html#line.729"><B>defineChar2StringMapping</B></A>(java.lang.String&nbsp;outputString,
char&nbsp;inputChar)</PRE>
<DL>
<DD>Call this method to register a char to String mapping, for example
to map '<' to "&lt;".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>outputString</CODE> - The String to map to.<DD><CODE>inputChar</CODE> - The char to map from.
<DT><B>Returns:</B><DD>true if the mapping is not one of:
<ul>
<li> '<' to "&lt;"
<li> '>' to "&gt;"
<li> '&' to "&amp;"
<li> '"' to "&quot;"
</ul></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CharInfo.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xml/serializer/AttributesImplSerializer.html" title="class in org.apache.xml.serializer"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/serializer/CharInfo.CharKey.html" title="class in org.apache.xml.serializer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/xml/serializer/CharInfo.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="CharInfo.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>