<!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> | |
EncodingInfo | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.xml.serializer.EncodingInfo class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="EncodingInfo"; | |
} | |
</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> </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/EncodingInfo.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"> | |
<A HREF="../../../../org/apache/xml/serializer/EmptySerializer.html" title="class in org.apache.xml.serializer"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/xml/serializer/EncodingInfo.EncodingImpl.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/EncodingInfo.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="EncodingInfo.html" target="_top"><B>NO FRAMES</B></A> | |
<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: <A HREF="#nested_class_summary">NESTED</A> | <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> | |
<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 EncodingInfo</H2> | |
<PRE> | |
java.lang.Object | |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xml.serializer.EncodingInfo</B> | |
</PRE> | |
<HR> | |
<DL> | |
<DT><PRE>public final class <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.60"><B>EncodingInfo</B></A><DT>extends java.lang.Object</DL> | |
</PRE> | |
<P> | |
Holds information about a given encoding, which is the Java name for the | |
encoding, the equivalent ISO name. | |
<p> | |
An object of this type has two useful methods | |
<pre> | |
isInEncoding(char ch); | |
</pre> | |
which can be called if the character is not the high one in | |
a surrogate pair and: | |
<pre> | |
isInEncoding(char high, char low); | |
</pre> | |
which can be called if the two characters from a high/low surrogate pair. | |
<p> | |
An EncodingInfo object is a node in a binary search tree. Such a node | |
will answer if a character is in the encoding, and do so for a given | |
range of unicode values (<code>m_first</code> to | |
<code>m_last</code>). It will handle a certain range of values | |
explicitly (<code>m_explFirst</code> to <code>m_explLast</code>). | |
If the unicode point is before that explicit range, that is it | |
is in the range <code>m_first <= value < m_explFirst</code>, then it will delegate to another EncodingInfo object for The root | |
of such a tree, m_before. Likewise for values in the range | |
<code>m_explLast < value <= m_last</code>, but delgating to <code>m_after</code> | |
<p> | |
Actually figuring out if a code point is in the encoding is expensive. So the | |
purpose of this tree is to cache such determinations, and not to build the | |
entire tree of information at the start, but only build up as much of the | |
tree as is used during the transformation. | |
<p> | |
This Class is not a public API, and should only be used internally within | |
the serializer. | |
<p> | |
This class is not a public API. | |
<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 class</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.EncodingImpl.html" title="class in org.apache.xml.serializer">EncodingInfo.EncodingImpl</A></B></CODE> | |
<BR> | |
This class implements the</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private static interface</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.InEncoding.html" title="interface in org.apache.xml.serializer">EncodingInfo.InEncoding</A></B></CODE> | |
<BR> | |
A simple interface to isolate the implementation.</TD> | |
</TR> | |
</TABLE> | |
<!-- =========== 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>(package private) java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#javaName">javaName</A></B></CODE> | |
<BR> | |
The name used by the Java convertor.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private <A HREF="../../../../org/apache/xml/serializer/EncodingInfo.InEncoding.html" title="interface in org.apache.xml.serializer">EncodingInfo.InEncoding</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#m_encoding">m_encoding</A></B></CODE> | |
<BR> | |
A helper object that we can ask if a | |
single char, or a surrogate UTF-16 pair | |
of chars that form a single character, | |
is in this encoding.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private char</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#m_highCharInContiguousGroup">m_highCharInContiguousGroup</A></B></CODE> | |
<BR> | |
Not all characters in an encoding are in on contiguous group, | |
however there is a lowest contiguous group starting at '' | |
and working up to m_highCharInContiguousGroup.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>(package private) java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#name">name</A></B></CODE> | |
<BR> | |
The ISO encoding name.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== 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><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#EncodingInfo(java.lang.String, java.lang.String, char)">EncodingInfo</A></B>(java.lang.String name, | |
java.lang.String javaName, | |
char highChar)</CODE> | |
<BR> | |
Create an EncodingInfo object based on the ISO name and Java name.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== 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> char</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#getHighChar()">getHighChar</A></B>()</CODE> | |
<BR> | |
This method exists for performance reasons.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private static boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#inEncoding(char, byte[])">inEncoding</A></B>(char ch, | |
byte[] data)</CODE> | |
<BR> | |
This method is the core of determining if character | |
is in the encoding.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private static boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#inEncoding(char, char, java.lang.String)">inEncoding</A></B>(char high, | |
char low, | |
java.lang.String encoding)</CODE> | |
<BR> | |
This is heart of the code that determines if a given high/low | |
surrogate pair forms a character that is in the given encoding.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private static boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#inEncoding(char, java.lang.String)">inEncoding</A></B>(char ch, | |
java.lang.String encoding)</CODE> | |
<BR> | |
This is heart of the code that determines if a given character | |
is in the given encoding.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#isInEncoding(char)">isInEncoding</A></B>(char ch)</CODE> | |
<BR> | |
This is not a public API.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#isInEncoding(char, char)">isInEncoding</A></B>(char high, | |
char low)</CODE> | |
<BR> | |
This is not a public API.</TD> | |
</TR> | |
</TABLE> | |
<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> | |
| |
<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_highCharInContiguousGroup"><!-- --></A><H3> | |
m_highCharInContiguousGroup</H3> | |
<PRE> | |
private final char <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.76"><B>m_highCharInContiguousGroup</B></A></PRE> | |
<DL> | |
<DD>Not all characters in an encoding are in on contiguous group, | |
however there is a lowest contiguous group starting at '' | |
and working up to m_highCharInContiguousGroup. | |
<p> | |
This is the char for which chars at or below this value are | |
definately in the encoding, although for chars | |
above this point they might be in the encoding. | |
This exists for performance, especially for ASCII characters | |
because for ASCII all chars in the range '' to '' | |
are in the encoding. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="name"><!-- --></A><H3> | |
name</H3> | |
<PRE> | |
final java.lang.String <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.81"><B>name</B></A></PRE> | |
<DL> | |
<DD>The ISO encoding name. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="javaName"><!-- --></A><H3> | |
javaName</H3> | |
<PRE> | |
final java.lang.String <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.86"><B>javaName</B></A></PRE> | |
<DL> | |
<DD>The name used by the Java convertor. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="m_encoding"><!-- --></A><H3> | |
m_encoding</H3> | |
<PRE> | |
private <A HREF="../../../../org/apache/xml/serializer/EncodingInfo.InEncoding.html" title="interface in org.apache.xml.serializer">EncodingInfo.InEncoding</A> <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.94"><B>m_encoding</B></A></PRE> | |
<DL> | |
<DD>A helper object that we can ask if a | |
single char, or a surrogate UTF-16 pair | |
of chars that form a single character, | |
is in this encoding. | |
<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="EncodingInfo(java.lang.String, java.lang.String, char)"><!-- --></A><H3> | |
EncodingInfo</H3> | |
<PRE> | |
public <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.149"><B>EncodingInfo</B></A>(java.lang.String name, | |
java.lang.String javaName, | |
char highChar)</PRE> | |
<DL> | |
<DD>Create an EncodingInfo object based on the ISO name and Java name. | |
If both parameters are null any character will be considered to | |
be in the encoding. This is useful for when the serializer is in | |
temporary output state, and has no assciated encoding. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - reference to the ISO name.<DD><CODE>javaName</CODE> - reference to the Java encoding name.<DD><CODE>highChar</CODE> - The char for which characters at or below this value are | |
definately in the | |
encoding, although for characters above this point they might be in the encoding.</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="isInEncoding(char)"><!-- --></A><H3> | |
isInEncoding</H3> | |
<PRE> | |
public boolean <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.104"><B>isInEncoding</B></A>(char ch)</PRE> | |
<DL> | |
<DD>This is not a public API. It returns true if the | |
char in question is in the encoding. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - the char in question. | |
<p> | |
This method is not a public API.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isInEncoding(char, char)"><!-- --></A><H3> | |
isInEncoding</H3> | |
<PRE> | |
public boolean <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.125"><B>isInEncoding</B></A>(char high, | |
char low)</PRE> | |
<DL> | |
<DD>This is not a public API. It returns true if the | |
character formed by the high/low pair is in the encoding. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>high</CODE> - a char that the a high char of a high/low surrogate pair.<DD><CODE>low</CODE> - a char that is the low char of a high/low surrogate pair. | |
<p> | |
This method is not a public API.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="inEncoding(char, java.lang.String)"><!-- --></A><H3> | |
inEncoding</H3> | |
<PRE> | |
private static boolean <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.425"><B>inEncoding</B></A>(char ch, | |
java.lang.String encoding)</PRE> | |
<DL> | |
<DD>This is heart of the code that determines if a given character | |
is in the given encoding. This method is probably expensive, | |
and the answer should be cached. | |
<p> | |
This method is not a public API, | |
and should only be used internally within the serializer. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - the char in question, that is not a high char of | |
a high/low surrogate pair.<DD><CODE>encoding</CODE> - the Java name of the enocding.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="inEncoding(char, char, java.lang.String)"><!-- --></A><H3> | |
inEncoding</H3> | |
<PRE> | |
private static boolean <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.464"><B>inEncoding</B></A>(char high, | |
char low, | |
java.lang.String encoding)</PRE> | |
<DL> | |
<DD>This is heart of the code that determines if a given high/low | |
surrogate pair forms a character that is in the given encoding. | |
This method is probably expensive, and the answer should be cached. | |
<p> | |
This method is not a public API, | |
and should only be used internally within the serializer. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>high</CODE> - the high char of | |
a high/low surrogate pair.<DD><CODE>low</CODE> - the low char of a high/low surrogate pair.<DD><CODE>encoding</CODE> - the Java name of the encoding.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="inEncoding(char, byte[])"><!-- --></A><H3> | |
inEncoding</H3> | |
<PRE> | |
private static boolean <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.494"><B>inEncoding</B></A>(char ch, | |
byte[] data)</PRE> | |
<DL> | |
<DD>This method is the core of determining if character | |
is in the encoding. The method is not foolproof, because | |
s.getBytes(encoding) has specified behavior only if the | |
characters are in the specified encoding. However this | |
method tries it's best. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - the char that was converted using getBytes, or | |
the first char of a high/low pair that was converted.<DD><CODE>data</CODE> - the bytes written out by the call to s.getBytes(encoding); | |
<DT><B>Returns:</B><DD>true if the character is in the encoding.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getHighChar()"><!-- --></A><H3> | |
getHighChar</H3> | |
<PRE> | |
public final char <A HREF="../../../../src-html/org/apache/xml/serializer/EncodingInfo.html#line.558"><B>getHighChar</B></A>()</PRE> | |
<DL> | |
<DD>This method exists for performance reasons. | |
<p> | |
Except for '', if a char is less than or equal to the value | |
returned by this method then it in the encoding. | |
<p> | |
The characters in an encoding are not contiguous, however | |
there is a lowest group of chars starting at '' upto and | |
including the char returned by this method that are all in the encoding. | |
So the char returned by this method essentially defines the lowest | |
contiguous group. | |
<p> | |
chars above the value returned might be in the encoding, but | |
chars at or below the value returned are definately in the encoding. | |
<p> | |
In any case however, the isInEncoding(char) method can be used | |
regardless of the value of the char returned by this method. | |
<p> | |
If the value returned is '' it means that every character must be tested | |
with an isInEncoding method <A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#isInEncoding(char)"><CODE>isInEncoding(char)</CODE></A> or <A HREF="../../../../org/apache/xml/serializer/EncodingInfo.html#isInEncoding(char, char)"><CODE>isInEncoding(char, char)</CODE></A> | |
for surrogate pairs. | |
<p> | |
This method is not a public API. | |
<P> | |
<DD><DL> | |
</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> </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/EncodingInfo.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"> | |
<A HREF="../../../../org/apache/xml/serializer/EmptySerializer.html" title="class in org.apache.xml.serializer"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/xml/serializer/EncodingInfo.EncodingImpl.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/EncodingInfo.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="EncodingInfo.html" target="_top"><B>NO FRAMES</B></A> | |
<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: <A HREF="#nested_class_summary">NESTED</A> | <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> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
</BODY> | |
</HTML> |