blob: 7ac191b0b600a78f4db8d3cd561e732c45deea14 [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:38 PDT 2012 -->
<TITLE>
FastStringBuffer
</TITLE>
<META NAME="keywords" CONTENT="org.apache.xml.utils.FastStringBuffer class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="FastStringBuffer";
}
</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/FastStringBuffer.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/utils/ElemDesc.html" title="class in org.apache.xml.utils"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/utils/Hashtree2Node.html" title="class in org.apache.xml.utils"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/xml/utils/FastStringBuffer.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="FastStringBuffer.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;NESTED&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.utils</FONT>
<BR>
Class FastStringBuffer</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xml.utils.FastStringBuffer</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.54"><B>FastStringBuffer</B></A><DT>extends java.lang.Object</DL>
</PRE>
<P>
Bare-bones, unsafe, fast string buffer. No thread-safety, no
parameter range checking, exposed fields. Note that in typical
applications, thread-safety of a StringBuffer is a somewhat
dubious concept in any case.
<p>
Note that Stree and DTM used a single FastStringBuffer as a string pool,
by recording start and length indices within this single buffer. This
minimizes heap overhead, but of course requires more work when retrieving
the data.
<p>
FastStringBuffer operates as a "chunked buffer". Doing so
reduces the need to recopy existing information when an append
exceeds the space available; we just allocate another chunk and
flow across to it. (The array of chunks may need to grow,
admittedly, but that's a much smaller object.) Some excess
recopying may arise when we extract Strings which cross chunk
boundaries; larger chunks make that less frequent.
<p>
The size values are parameterized, to allow tuning this code. In
theory, Result Tree Fragments might want to be tuned differently
from the main document's text.
<p>
%REVIEW% An experiment in self-tuning is
included in the code (using nested FastStringBuffers to achieve
variation in chunk sizes), but this implementation has proven to
be problematic when data may be being copied from the FSB into itself.
We should either re-architect that to make this safe (if possible)
or remove that code and clean up for performance/maintainability reasons.
<p>
<P>
<P>
<HR>
<P>
<!-- =========== 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 static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#CARRY_WS">CARRY_WS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Manifest constant: Carry trailing whitespace of one chunk as leading
whitespace of the next chunk.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#DEBUG_FORCE_FIXED_CHUNKSIZE">DEBUG_FORCE_FIXED_CHUNKSIZE</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;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#DEBUG_FORCE_INIT_BITS">DEBUG_FORCE_INIT_BITS</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) &nbsp;char[][]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_array">m_array</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_array holds the string buffer's text contents, using an
array-of-arrays.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_chunkBits">m_chunkBits</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_chunkBits sets our chunking strategy, by saying how many
bits of index can be used within a single chunk before flowing over
to the next chunk.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_chunkMask">m_chunkMask</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_chunkMask is m_chunkSize-1 -- in other words, m_chunkBits
worth of low-order '1' bits, useful for shift-and-mask addressing
within the chunks.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_chunkSize">m_chunkSize</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_chunkSize establishes the maximum size of one chunk of the array
as 2**chunkbits characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_firstFree">m_firstFree</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_firstFree is an index into m_array[m_lastChunk][], pointing to
the first character in the Chunked Array which is not part of the
FastStringBuffer's current content.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;<A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html" title="class in org.apache.xml.utils">FastStringBuffer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_innerFSB">m_innerFSB</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_innerFSB, when non-null, is a FastStringBuffer whose total
length equals m_chunkSize, and which replaces m_array[0].</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_lastChunk">m_lastChunk</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_lastChunk is an index into m_array[], pointing to the last
chunk of the Chunked Array currently in use.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_maxChunkBits">m_maxChunkBits</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_maxChunkBits affects our chunk-growth strategy, by saying what
the largest permissible chunk size is in this particular FastStringBuffer
hierarchy.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#m_rebundleBits">m_rebundleBits</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Field m_rechunkBits affects our chunk-growth strategy, by saying how
many chunks should be allocated at one size before we encapsulate them
into the first chunk of the next size up.</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/utils/FastStringBuffer.html#SINGLE_SPACE">SINGLE_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>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#SUPPRESS_BOTH">SUPPRESS_BOTH</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Manifest constant: Suppress both leading and trailing whitespace.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#SUPPRESS_LEADING_WS">SUPPRESS_LEADING_WS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Manifest constant: Suppress leading whitespace.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#SUPPRESS_TRAILING_WS">SUPPRESS_TRAILING_WS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Manifest constant: Suppress trailing whitespace.</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>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#FastStringBuffer()">FastStringBuffer</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a FastStringBuffer, using a default allocation policy.</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/utils/FastStringBuffer.html#FastStringBuffer(org.apache.xml.utils.FastStringBuffer)">FastStringBuffer</A></B>(<A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html" title="class in org.apache.xml.utils">FastStringBuffer</A>&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encapsulation c'tor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#FastStringBuffer(int)">FastStringBuffer</A></B>(int&nbsp;initChunkBits)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a FastStringBuffer, using default maxChunkBits and
rebundleBits values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#FastStringBuffer(int, int)">FastStringBuffer</A></B>(int&nbsp;initChunkBits,
int&nbsp;maxChunkBits)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a FastStringBuffer, using a default rebundleBits value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#FastStringBuffer(int, int, int)">FastStringBuffer</A></B>(int&nbsp;initChunkBits,
int&nbsp;maxChunkBits,
int&nbsp;rebundleBits)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a FastStringBuffer, with allocation policy as per parameters.</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#append(char)">append</A></B>(char&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append a single character onto the FastStringBuffer, growing the
storage if necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#append(char[], int, int)">append</A></B>(char[]&nbsp;chars,
int&nbsp;start,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append part of the contents of a Character Array onto the
FastStringBuffer, growing the storage if necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#append(org.apache.xml.utils.FastStringBuffer)">append</A></B>(<A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html" title="class in org.apache.xml.utils">FastStringBuffer</A>&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append the contents of another FastStringBuffer onto
this FastStringBuffer, growing the storage if necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#append(java.lang.String)">append</A></B>(java.lang.String&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append the contents of a String onto the FastStringBuffer,
growing the storage if necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#append(java.lang.StringBuffer)">append</A></B>(java.lang.StringBuffer&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append the contents of a StringBuffer onto the FastStringBuffer,
growing the storage if necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#charAt(int)">charAt</A></B>(int&nbsp;pos)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a single character from the string buffer.</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/utils/FastStringBuffer.html#getChars(int, int, char[], int)">getChars</A></B>(int&nbsp;srcBegin,
int&nbsp;srcEnd,
char[]&nbsp;dst,
int&nbsp;dstBegin)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copies characters from this string into the destination character
array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#getOneChunkString(int, int, int)">getOneChunkString</A></B>(int&nbsp;startChunk,
int&nbsp;startColumn,
int&nbsp;length)</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>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#getString(int, int)">getString</A></B>(int&nbsp;start,
int&nbsp;length)</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.StringBuffer</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#getString(java.lang.StringBuffer, int, int)">getString</A></B>(java.lang.StringBuffer&nbsp;sb,
int&nbsp;start,
int&nbsp;length)</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.StringBuffer</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#getString(java.lang.StringBuffer, int, int, int)">getString</A></B>(java.lang.StringBuffer&nbsp;sb,
int&nbsp;startChunk,
int&nbsp;startColumn,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal support for toString() and getString().</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#isWhitespace(int, int)">isWhitespace</A></B>(int&nbsp;start,
int&nbsp;length)</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>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#length()">length</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the length of the list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#reset()">reset</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Discard the content of the FastStringBuffer, and most of the memory
that was allocated by it, restoring the initial state.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#sendNormalizedSAXcharacters(char[], int, int, org.xml.sax.ContentHandler)">sendNormalizedSAXcharacters</A></B>(char[]&nbsp;ch,
int&nbsp;start,
int&nbsp;length,
org.xml.sax.ContentHandler&nbsp;handler)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Directly normalize and dispatch the character array.</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/utils/FastStringBuffer.html#sendNormalizedSAXcharacters(char[], int, int, org.xml.sax.ContentHandler, int)">sendNormalizedSAXcharacters</A></B>(char[]&nbsp;ch,
int&nbsp;start,
int&nbsp;length,
org.xml.sax.ContentHandler&nbsp;handler,
int&nbsp;edgeTreatmentFlags)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal method to directly normalize and dispatch the character array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#sendNormalizedSAXcharacters(org.xml.sax.ContentHandler, int, int)">sendNormalizedSAXcharacters</A></B>(org.xml.sax.ContentHandler&nbsp;ch,
int&nbsp;start,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends the specified range of characters as one or more SAX characters()
events, normalizing the characters according to XSLT rules.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#sendSAXcharacters(org.xml.sax.ContentHandler, int, int)">sendSAXcharacters</A></B>(org.xml.sax.ContentHandler&nbsp;ch,
int&nbsp;start,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends the specified range of characters as one or more SAX characters()
events.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#sendSAXComment(org.xml.sax.ext.LexicalHandler, int, int)">sendSAXComment</A></B>(org.xml.sax.ext.LexicalHandler&nbsp;ch,
int&nbsp;start,
int&nbsp;length)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends the specified range of characters as sax Comment.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#setLength(int)">setLength</A></B>(int&nbsp;l)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Directly set how much of the FastStringBuffer's storage is to be
considered part of its content.</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/utils/FastStringBuffer.html#setLength(int, org.apache.xml.utils.FastStringBuffer)">setLength</A></B>(int&nbsp;l,
<A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html" title="class in org.apache.xml.utils">FastStringBuffer</A>&nbsp;rootFSB)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subroutine for the public setLength() method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#size()">size</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the length of the list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note that this operation has been somewhat deoptimized by the shift to a
chunked array, as there is no factory method to produce a String object
directly from an array of arrays and hence a double copy is needed.</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, 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="DEBUG_FORCE_INIT_BITS"><!-- --></A><H3>
DEBUG_FORCE_INIT_BITS</H3>
<PRE>
static final int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.57"><B>DEBUG_FORCE_INIT_BITS</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.utils.FastStringBuffer.DEBUG_FORCE_INIT_BITS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEBUG_FORCE_FIXED_CHUNKSIZE"><!-- --></A><H3>
DEBUG_FORCE_FIXED_CHUNKSIZE</H3>
<PRE>
static final boolean <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.65"><B>DEBUG_FORCE_FIXED_CHUNKSIZE</B></A></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.utils.FastStringBuffer.DEBUG_FORCE_FIXED_CHUNKSIZE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="SUPPRESS_LEADING_WS"><!-- --></A><H3>
SUPPRESS_LEADING_WS</H3>
<PRE>
public static final int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.73"><B>SUPPRESS_LEADING_WS</B></A></PRE>
<DL>
<DD>Manifest constant: Suppress leading whitespace.
This should be used when normalize-to-SAX is called for the first chunk of a
multi-chunk output, or one following unsuppressed whitespace in a previous
chunk.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#sendNormalizedSAXcharacters(org.xml.sax.ContentHandler, int, int)"><CODE>sendNormalizedSAXcharacters(org.xml.sax.ContentHandler,int,int)</CODE></A>,
<A HREF="../../../../constant-values.html#org.apache.xml.utils.FastStringBuffer.SUPPRESS_LEADING_WS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="SUPPRESS_TRAILING_WS"><!-- --></A><H3>
SUPPRESS_TRAILING_WS</H3>
<PRE>
public static final int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.79"><B>SUPPRESS_TRAILING_WS</B></A></PRE>
<DL>
<DD>Manifest constant: Suppress trailing whitespace.
This should be used when normalize-to-SAX is called for the last chunk of a
multi-chunk output; it may have to be or'ed with SUPPRESS_LEADING_WS.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.utils.FastStringBuffer.SUPPRESS_TRAILING_WS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="SUPPRESS_BOTH"><!-- --></A><H3>
SUPPRESS_BOTH</H3>
<PRE>
public static final int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.86"><B>SUPPRESS_BOTH</B></A></PRE>
<DL>
<DD>Manifest constant: Suppress both leading and trailing whitespace.
This should be used when normalize-to-SAX is called for a complete string.
(I'm not wild about the name of this one. Ideas welcome.)
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html#sendNormalizedSAXcharacters(org.xml.sax.ContentHandler, int, int)"><CODE>sendNormalizedSAXcharacters(org.xml.sax.ContentHandler,int,int)</CODE></A>,
<A HREF="../../../../constant-values.html#org.apache.xml.utils.FastStringBuffer.SUPPRESS_BOTH">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="CARRY_WS"><!-- --></A><H3>
CARRY_WS</H3>
<PRE>
private static final int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.93"><B>CARRY_WS</B></A></PRE>
<DL>
<DD>Manifest constant: Carry trailing whitespace of one chunk as leading
whitespace of the next chunk. Used internally; I don't see any reason
to make it public right now.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xml.utils.FastStringBuffer.CARRY_WS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="m_chunkBits"><!-- --></A><H3>
m_chunkBits</H3>
<PRE>
int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.101"><B>m_chunkBits</B></A></PRE>
<DL>
<DD>Field m_chunkBits sets our chunking strategy, by saying how many
bits of index can be used within a single chunk before flowing over
to the next chunk. For example, if m_chunkbits is set to 15, each
chunk can contain up to 2^15 (32K) characters
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_maxChunkBits"><!-- --></A><H3>
m_maxChunkBits</H3>
<PRE>
int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.108"><B>m_maxChunkBits</B></A></PRE>
<DL>
<DD>Field m_maxChunkBits affects our chunk-growth strategy, by saying what
the largest permissible chunk size is in this particular FastStringBuffer
hierarchy.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_rebundleBits"><!-- --></A><H3>
m_rebundleBits</H3>
<PRE>
int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.118"><B>m_rebundleBits</B></A></PRE>
<DL>
<DD>Field m_rechunkBits affects our chunk-growth strategy, by saying how
many chunks should be allocated at one size before we encapsulate them
into the first chunk of the next size up. For example, if m_rechunkBits
is set to 3, then after 8 chunks at a given size we will rebundle
them as the first element of a FastStringBuffer using a chunk size
8 times larger (chunkBits shifted left three bits).
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_chunkSize"><!-- --></A><H3>
m_chunkSize</H3>
<PRE>
int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.125"><B>m_chunkSize</B></A></PRE>
<DL>
<DD>Field m_chunkSize establishes the maximum size of one chunk of the array
as 2**chunkbits characters.
(Which may also be the minimum size if we aren't tuning for storage)
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_chunkMask"><!-- --></A><H3>
m_chunkMask</H3>
<PRE>
int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.132"><B>m_chunkMask</B></A></PRE>
<DL>
<DD>Field m_chunkMask is m_chunkSize-1 -- in other words, m_chunkBits
worth of low-order '1' bits, useful for shift-and-mask addressing
within the chunks.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_array"><!-- --></A><H3>
m_array</H3>
<PRE>
char[][] <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.142"><B>m_array</B></A></PRE>
<DL>
<DD>Field m_array holds the string buffer's text contents, using an
array-of-arrays. Note that this array, and the arrays it contains, may be
reallocated when necessary in order to allow the buffer to grow;
references to them should be considered to be invalidated after any
append. However, the only time these arrays are directly exposed
is in the sendSAXcharacters call.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_lastChunk"><!-- --></A><H3>
m_lastChunk</H3>
<PRE>
int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.153"><B>m_lastChunk</B></A></PRE>
<DL>
<DD>Field m_lastChunk is an index into m_array[], pointing to the last
chunk of the Chunked Array currently in use. Note that additional
chunks may actually be allocated, eg if the FastStringBuffer had
previously been truncated or if someone issued an ensureSpace request.
<p>
The insertion point for append operations is addressed by the combination
of m_lastChunk and m_firstFree.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_firstFree"><!-- --></A><H3>
m_firstFree</H3>
<PRE>
int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.162"><B>m_firstFree</B></A></PRE>
<DL>
<DD>Field m_firstFree is an index into m_array[m_lastChunk][], pointing to
the first character in the Chunked Array which is not part of the
FastStringBuffer's current content. Since m_array[][] is zero-based,
the length of that content can be calculated as
(m_lastChunk<<m_chunkBits) + m_firstFree
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_innerFSB"><!-- --></A><H3>
m_innerFSB</H3>
<PRE>
<A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html" title="class in org.apache.xml.utils">FastStringBuffer</A> <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.171"><B>m_innerFSB</B></A></PRE>
<DL>
<DD>Field m_innerFSB, when non-null, is a FastStringBuffer whose total
length equals m_chunkSize, and which replaces m_array[0]. This allows
building a hierarchy of FastStringBuffers, where early appends use
a smaller chunkSize (for less wasted memory overhead) but later
ones use a larger chunkSize (for less heap activity overhead).
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="SINGLE_SPACE"><!-- --></A><H3>
SINGLE_SPACE</H3>
<PRE>
static final char[] <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.1082"><B>SINGLE_SPACE</B></A></PRE>
<DL>
<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="FastStringBuffer(int, int, int)"><!-- --></A><H3>
FastStringBuffer</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.195"><B>FastStringBuffer</B></A>(int&nbsp;initChunkBits,
int&nbsp;maxChunkBits,
int&nbsp;rebundleBits)</PRE>
<DL>
<DD>Construct a FastStringBuffer, with allocation policy as per parameters.
<p>
For coding convenience, I've expressed both allocation sizes in terms of
a number of bits. That's needed for the final size of a chunk,
to permit fast and efficient shift-and-mask addressing. It's less critical
for the inital size, and may be reconsidered.
<p>
An alternative would be to accept integer sizes and round to powers of two;
that really doesn't seem to buy us much, if anything.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>initChunkBits</CODE> - Length in characters of the initial allocation
of a chunk, expressed in log-base-2. (That is, 10 means allocate 1024
characters.) Later chunks will use larger allocation units, to trade off
allocation speed of large document against storage efficiency of small
ones.<DD><CODE>maxChunkBits</CODE> - Number of character-offset bits that should be used for
addressing within a chunk. Maximum length of a chunk is 2^chunkBits
characters.<DD><CODE>rebundleBits</CODE> - Number of character-offset bits that addressing should
advance before we attempt to take a step from initChunkBits to maxChunkBits</DL>
</DL>
<HR>
<A NAME="FastStringBuffer(int, int)"><!-- --></A><H3>
FastStringBuffer</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.230"><B>FastStringBuffer</B></A>(int&nbsp;initChunkBits,
int&nbsp;maxChunkBits)</PRE>
<DL>
<DD>Construct a FastStringBuffer, using a default rebundleBits value.
NEEDSDOC @param initChunkBits
NEEDSDOC @param maxChunkBits
<P>
</DL>
<HR>
<A NAME="FastStringBuffer(int)"><!-- --></A><H3>
FastStringBuffer</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.244"><B>FastStringBuffer</B></A>(int&nbsp;initChunkBits)</PRE>
<DL>
<DD>Construct a FastStringBuffer, using default maxChunkBits and
rebundleBits values.
<p>
ISSUE: Should this call assert initial size, or fixed size?
Now configured as initial, with a default for fixed.
NEEDSDOC @param initChunkBits
<P>
</DL>
<HR>
<A NAME="FastStringBuffer()"><!-- --></A><H3>
FastStringBuffer</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.252"><B>FastStringBuffer</B></A>()</PRE>
<DL>
<DD>Construct a FastStringBuffer, using a default allocation policy.
<P>
</DL>
<HR>
<A NAME="FastStringBuffer(org.apache.xml.utils.FastStringBuffer)"><!-- --></A><H3>
FastStringBuffer</H3>
<PRE>
private <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.1263"><B>FastStringBuffer</B></A>(<A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html" title="class in org.apache.xml.utils">FastStringBuffer</A>&nbsp;source)</PRE>
<DL>
<DD>Encapsulation c'tor. After this is called, the source FastStringBuffer
will be reset to use the new object as its m_innerFSB, and will have
had its chunk size reset appropriately. IT SHOULD NEVER BE CALLED
EXCEPT WHEN source.length()==1<<(source.m_chunkBits+source.m_rebundleBits)
NEEDSDOC @param source
<P>
</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="size()"><!-- --></A><H3>
size</H3>
<PRE>
public final int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.268"><B>size</B></A>()</PRE>
<DL>
<DD>Get the length of the list. Synonym for length().
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the number of characters in the FastStringBuffer's content.</DL>
</DD>
</DL>
<HR>
<A NAME="length()"><!-- --></A><H3>
length</H3>
<PRE>
public final int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.278"><B>length</B></A>()</PRE>
<DL>
<DD>Get the length of the list. Synonym for size().
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the number of characters in the FastStringBuffer's content.</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
public final void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.288"><B>reset</B></A>()</PRE>
<DL>
<DD>Discard the content of the FastStringBuffer, and most of the memory
that was allocated by it, restoring the initial state. Note that this
may eventually be different from setLength(0), which see.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setLength(int)"><!-- --></A><H3>
setLength</H3>
<PRE>
public final void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.324"><B>setLength</B></A>(int&nbsp;l)</PRE>
<DL>
<DD>Directly set how much of the FastStringBuffer's storage is to be
considered part of its content. This is a fast but hazardous
operation. It is not protected against negative values, or values
greater than the amount of storage currently available... and even
if additional storage does exist, its contents are unpredictable.
The only safe use for our setLength() is to truncate the FastStringBuffer
to a shorter string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - New length. If l<0 or l>=getLength(), this operation will
not report an error but future operations will almost certainly fail.</DL>
</DD>
</DL>
<HR>
<A NAME="setLength(int, org.apache.xml.utils.FastStringBuffer)"><!-- --></A><H3>
setLength</H3>
<PRE>
private final void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.357"><B>setLength</B></A>(int&nbsp;l,
<A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html" title="class in org.apache.xml.utils">FastStringBuffer</A>&nbsp;rootFSB)</PRE>
<DL>
<DD>Subroutine for the public setLength() method. Deals with the fact
that truncation may require restoring one of the innerFSBs
NEEDSDOC @param l
NEEDSDOC @param rootFSB
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public final java.lang.String <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.398"><B>toString</B></A>()</PRE>
<DL>
<DD>Note that this operation has been somewhat deoptimized by the shift to a
chunked array, as there is no factory method to produce a String object
directly from an array of arrays and hence a double copy is needed.
By using ensureCapacity we hope to minimize the heap overhead of building
the intermediate StringBuffer.
<p>
(It really is a pity that Java didn't design String as a final subclass
of MutableString, rather than having StringBuffer be a separate hierarchy.
We'd avoid a <strong>lot</strong> of double-buffering.)
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the contents of the FastStringBuffer as a standard Java string.</DL>
</DD>
</DL>
<HR>
<A NAME="append(char)"><!-- --></A><H3>
append</H3>
<PRE>
public final void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.416"><B>append</B></A>(char&nbsp;value)</PRE>
<DL>
<DD>Append a single character onto the FastStringBuffer, growing the
storage if necessary.
<p>
NOTE THAT after calling append(), previously obtained
references to m_array[][] may no longer be valid....
though in fact they should be in this instance.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - character to be appended.</DL>
</DD>
</DL>
<HR>
<A NAME="append(java.lang.String)"><!-- --></A><H3>
append</H3>
<PRE>
public final void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.477"><B>append</B></A>(java.lang.String&nbsp;value)</PRE>
<DL>
<DD>Append the contents of a String onto the FastStringBuffer,
growing the storage if necessary.
<p>
NOTE THAT after calling append(), previously obtained
references to m_array[] may no longer be valid.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - String whose contents are to be appended.</DL>
</DD>
</DL>
<HR>
<A NAME="append(java.lang.StringBuffer)"><!-- --></A><H3>
append</H3>
<PRE>
public final void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.559"><B>append</B></A>(java.lang.StringBuffer&nbsp;value)</PRE>
<DL>
<DD>Append the contents of a StringBuffer onto the FastStringBuffer,
growing the storage if necessary.
<p>
NOTE THAT after calling append(), previously obtained
references to m_array[] may no longer be valid.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - StringBuffer whose contents are to be appended.</DL>
</DD>
</DL>
<HR>
<A NAME="append(char[], int, int)"><!-- --></A><H3>
append</H3>
<PRE>
public final void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.644"><B>append</B></A>(char[]&nbsp;chars,
int&nbsp;start,
int&nbsp;length)</PRE>
<DL>
<DD>Append part of the contents of a Character Array onto the
FastStringBuffer, growing the storage if necessary.
<p>
NOTE THAT after calling append(), previously obtained
references to m_array[] may no longer be valid.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>chars</CODE> - character array from which data is to be copied<DD><CODE>start</CODE> - offset in chars of first character to be copied,
zero-based.<DD><CODE>length</CODE> - number of characters to be copied</DL>
</DD>
</DL>
<HR>
<A NAME="append(org.apache.xml.utils.FastStringBuffer)"><!-- --></A><H3>
append</H3>
<PRE>
public final void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.725"><B>append</B></A>(<A HREF="../../../../org/apache/xml/utils/FastStringBuffer.html" title="class in org.apache.xml.utils">FastStringBuffer</A>&nbsp;value)</PRE>
<DL>
<DD>Append the contents of another FastStringBuffer onto
this FastStringBuffer, growing the storage if necessary.
<p>
NOTE THAT after calling append(), previously obtained
references to m_array[] may no longer be valid.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - FastStringBuffer whose contents are
to be appended.</DL>
</DD>
</DL>
<HR>
<A NAME="isWhitespace(int, int)"><!-- --></A><H3>
isWhitespace</H3>
<PRE>
public boolean <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.824"><B>isWhitespace</B></A>(int&nbsp;start,
int&nbsp;length)</PRE>
<DL>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>start</CODE> - Offset of first character in the range.<DD><CODE>length</CODE> - Number of characters to send.
<DT><B>Returns:</B><DD>true if the specified range of characters are all whitespace,
as defined by XMLCharacterRecognizer.
<p>
CURRENTLY DOES NOT CHECK FOR OUT-OF-RANGE.</DL>
</DD>
</DL>
<HR>
<A NAME="getString(int, int)"><!-- --></A><H3>
getString</H3>
<PRE>
public java.lang.String <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.862"><B>getString</B></A>(int&nbsp;start,
int&nbsp;length)</PRE>
<DL>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>start</CODE> - Offset of first character in the range.<DD><CODE>length</CODE> - Number of characters to send.
<DT><B>Returns:</B><DD>a new String object initialized from the specified range of
characters.</DL>
</DD>
</DL>
<HR>
<A NAME="getOneChunkString(int, int, int)"><!-- --></A><H3>
getOneChunkString</H3>
<PRE>
protected java.lang.String <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.873"><B>getOneChunkString</B></A>(int&nbsp;startChunk,
int&nbsp;startColumn,
int&nbsp;length)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getString(java.lang.StringBuffer, int, int)"><!-- --></A><H3>
getString</H3>
<PRE>
java.lang.StringBuffer <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.884"><B>getString</B></A>(java.lang.StringBuffer&nbsp;sb,
int&nbsp;start,
int&nbsp;length)</PRE>
<DL>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sb</CODE> - StringBuffer to be appended to<DD><CODE>start</CODE> - Offset of first character in the range.<DD><CODE>length</CODE> - Number of characters to send.
<DT><B>Returns:</B><DD>sb with the requested text appended to it</DL>
</DD>
</DL>
<HR>
<A NAME="getString(java.lang.StringBuffer, int, int, int)"><!-- --></A><H3>
getString</H3>
<PRE>
java.lang.StringBuffer <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.913"><B>getString</B></A>(java.lang.StringBuffer&nbsp;sb,
int&nbsp;startChunk,
int&nbsp;startColumn,
int&nbsp;length)</PRE>
<DL>
<DD>Internal support for toString() and getString().
PLEASE NOTE SIGNATURE CHANGE from earlier versions; it now appends into
and returns a StringBuffer supplied by the caller. This simplifies
m_innerFSB support.
<p>
Note that this operation has been somewhat deoptimized by the shift to a
chunked array, as there is no factory method to produce a String object
directly from an array of arrays and hence a double copy is needed.
By presetting length we hope to minimize the heap overhead of building
the intermediate StringBuffer.
<p>
(It really is a pity that Java didn't design String as a final subclass
of MutableString, rather than having StringBuffer be a separate hierarchy.
We'd avoid a <strong>lot</strong> of double-buffering.)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sb</CODE> - <DD><CODE>startChunk</CODE> - <DD><CODE>startColumn</CODE> - <DD><CODE>length</CODE> -
<DT><B>Returns:</B><DD>the contents of the FastStringBuffer as a standard Java string.</DL>
</DD>
</DL>
<HR>
<A NAME="charAt(int)"><!-- --></A><H3>
charAt</H3>
<PRE>
public char <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.948"><B>charAt</B></A>(int&nbsp;pos)</PRE>
<DL>
<DD>Get a single character from the string buffer.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pos</CODE> - character position requested.
<DT><B>Returns:</B><DD>A character from the requested position.</DL>
</DD>
</DL>
<HR>
<A NAME="sendSAXcharacters(org.xml.sax.ContentHandler, int, int)"><!-- --></A><H3>
sendSAXcharacters</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.977"><B>sendSAXcharacters</B></A>(org.xml.sax.ContentHandler&nbsp;ch,
int&nbsp;start,
int&nbsp;length)
throws org.xml.sax.SAXException</PRE>
<DL>
<DD>Sends the specified range of characters as one or more SAX characters()
events.
Note that the buffer reference passed to the ContentHandler may be
invalidated if the FastStringBuffer is edited; it's the user's
responsibility to manage access to the FastStringBuffer to prevent this
problem from arising.
<p>
Note too that there is no promise that the output will be sent as a
single call. As is always true in SAX, one logical string may be split
across multiple blocks of memory and hence delivered as several
successive events.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - SAX ContentHandler object to receive the event.<DD><CODE>start</CODE> - Offset of first character in the range.<DD><CODE>length</CODE> - Number of characters to send.
<DT><B>Throws:</B>
<DD><CODE>org.xml.sax.SAXException</CODE> - may be thrown by handler's
characters() method.</DL>
</DD>
</DL>
<HR>
<A NAME="sendNormalizedSAXcharacters(org.xml.sax.ContentHandler, int, int)"><!-- --></A><H3>
sendNormalizedSAXcharacters</H3>
<PRE>
public int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.1037"><B>sendNormalizedSAXcharacters</B></A>(org.xml.sax.ContentHandler&nbsp;ch,
int&nbsp;start,
int&nbsp;length)
throws org.xml.sax.SAXException</PRE>
<DL>
<DD>Sends the specified range of characters as one or more SAX characters()
events, normalizing the characters according to XSLT rules.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - SAX ContentHandler object to receive the event.<DD><CODE>start</CODE> - Offset of first character in the range.<DD><CODE>length</CODE> - Number of characters to send.
<DT><B>Returns:</B><DD>normalization status to apply to next chunk (because we may
have been called recursively to process an inner FSB):
<dl>
<dt>0</dt>
<dd>if this output did not end in retained whitespace, and thus whitespace
at the start of the following chunk (if any) should be converted to a
single space.
<dt>SUPPRESS_LEADING_WS</dt>
<dd>if this output ended in retained whitespace, and thus whitespace
at the start of the following chunk (if any) should be completely
suppressed.</dd>
</dd>
</dl>
<DT><B>Throws:</B>
<DD><CODE>org.xml.sax.SAXException</CODE> - may be thrown by handler's
characters() method.</DL>
</DD>
</DL>
<HR>
<A NAME="sendNormalizedSAXcharacters(char[], int, int, org.xml.sax.ContentHandler, int)"><!-- --></A><H3>
sendNormalizedSAXcharacters</H3>
<PRE>
static int <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.1127"><B>sendNormalizedSAXcharacters</B></A>(char[]&nbsp;ch,
int&nbsp;start,
int&nbsp;length,
org.xml.sax.ContentHandler&nbsp;handler,
int&nbsp;edgeTreatmentFlags)
throws org.xml.sax.SAXException</PRE>
<DL>
<DD>Internal method to directly normalize and dispatch the character array.
This version is aware of the fact that it may be called several times
in succession if the data is made up of multiple "chunks", and thus
must actively manage the handling of leading and trailing whitespace.
Note: The recursion is due to the possible recursion of inner FSBs.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - The characters from the XML document.<DD><CODE>start</CODE> - The start position in the array.<DD><CODE>length</CODE> - The number of characters to read from the array.<DD><CODE>handler</CODE> - SAX ContentHandler object to receive the event.<DD><CODE>edgeTreatmentFlags</CODE> - How leading/trailing spaces should be handled.
This is a bitfield contining two flags, bitwise-ORed together:
<dl>
<dt>SUPPRESS_LEADING_WS</dt>
<dd>When false, causes leading whitespace to be converted to a single
space; when true, causes it to be discarded entirely.
Should be set TRUE for the first chunk, and (in multi-chunk output)
whenever the previous chunk ended in retained whitespace.</dd>
<dt>SUPPRESS_TRAILING_WS</dt>
<dd>When false, causes trailing whitespace to be converted to a single
space; when true, causes it to be discarded entirely.
Should be set TRUE for the last or only chunk.
</dd>
</dl>
<DT><B>Returns:</B><DD>normalization status, as in the edgeTreatmentFlags parameter:
<dl>
<dt>0</dt>
<dd>if this output did not end in retained whitespace, and thus whitespace
at the start of the following chunk (if any) should be converted to a
single space.
<dt>SUPPRESS_LEADING_WS</dt>
<dd>if this output ended in retained whitespace, and thus whitespace
at the start of the following chunk (if any) should be completely
suppressed.</dd>
</dd>
</dl>
<DT><B>Throws:</B>
<DD><CODE>org.xml.sax.SAXException</CODE> - Any SAX exception, possibly
wrapping another exception.</DL>
</DD>
</DL>
<HR>
<A NAME="sendNormalizedSAXcharacters(char[], int, int, org.xml.sax.ContentHandler)"><!-- --></A><H3>
sendNormalizedSAXcharacters</H3>
<PRE>
public static void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.1198"><B>sendNormalizedSAXcharacters</B></A>(char[]&nbsp;ch,
int&nbsp;start,
int&nbsp;length,
org.xml.sax.ContentHandler&nbsp;handler)
throws org.xml.sax.SAXException</PRE>
<DL>
<DD>Directly normalize and dispatch the character array.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - The characters from the XML document.<DD><CODE>start</CODE> - The start position in the array.<DD><CODE>length</CODE> - The number of characters to read from the array.<DD><CODE>handler</CODE> - SAX ContentHandler object to receive the event.
<DT><B>Throws:</B>
<DD><CODE>org.xml.sax.SAXException</CODE> - Any SAX exception, possibly
wrapping another exception.</DL>
</DD>
</DL>
<HR>
<A NAME="sendSAXComment(org.xml.sax.ext.LexicalHandler, int, int)"><!-- --></A><H3>
sendSAXComment</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.1219"><B>sendSAXComment</B></A>(org.xml.sax.ext.LexicalHandler&nbsp;ch,
int&nbsp;start,
int&nbsp;length)
throws org.xml.sax.SAXException</PRE>
<DL>
<DD>Sends the specified range of characters as sax Comment.
<p>
Note that, unlike sendSAXcharacters, this has to be done as a single
call to LexicalHandler#comment.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - SAX LexicalHandler object to receive the event.<DD><CODE>start</CODE> - Offset of first character in the range.<DD><CODE>length</CODE> - Number of characters to send.
<DT><B>Throws:</B>
<DD><CODE>org.xml.sax.SAXException</CODE> - may be thrown by handler's
characters() method.</DL>
</DD>
</DL>
<HR>
<A NAME="getChars(int, int, char[], int)"><!-- --></A><H3>
getChars</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/utils/FastStringBuffer.html#line.1250"><B>getChars</B></A>(int&nbsp;srcBegin,
int&nbsp;srcEnd,
char[]&nbsp;dst,
int&nbsp;dstBegin)</PRE>
<DL>
<DD>Copies characters from this string into the destination character
array.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>srcBegin</CODE> - index of the first character in the string
to copy.<DD><CODE>srcEnd</CODE> - index after the last character in the string
to copy.<DD><CODE>dst</CODE> - the destination array.<DD><CODE>dstBegin</CODE> - the start offset in the destination array.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - If any of the following
is true:
<ul><li><code>srcBegin</code> is negative.
<li><code>srcBegin</code> is greater than <code>srcEnd</code>
<li><code>srcEnd</code> is greater than the length of this
string
<li><code>dstBegin</code> is negative
<li><code>dstBegin+(srcEnd-srcBegin)</code> is larger than
<code>dst.length</code></ul>
<DD><CODE>java.lang.NullPointerException</CODE> - if <code>dst</code> is <code>null</code></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/FastStringBuffer.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/utils/ElemDesc.html" title="class in org.apache.xml.utils"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/utils/Hashtree2Node.html" title="class in org.apache.xml.utils"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/xml/utils/FastStringBuffer.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="FastStringBuffer.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;NESTED&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>