blob: bc6e8424c90045c359397aa2e8f0e6766b002f52 [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>
SuballocatedByteVector
</TITLE>
<META NAME="keywords" CONTENT="org.apache.xml.utils.SuballocatedByteVector class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="SuballocatedByteVector";
}
</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/SuballocatedByteVector.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/StylesheetPIHandler.html" title="class in org.apache.xml.utils"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/utils/SuballocatedIntVector.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/SuballocatedByteVector.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SuballocatedByteVector.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 SuballocatedByteVector</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xml.utils.SuballocatedByteVector</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.44"><B>SuballocatedByteVector</B></A><DT>extends java.lang.Object</DL>
</PRE>
<P>
A very simple table that stores a list of byte. Very similar API to our
IntVector class (same API); different internal storage.
This version uses an array-of-arrays solution. Read/write access is thus
a bit slower than the simple IntVector, and basic storage is a trifle
higher due to the top-level array -- but appending is O(1) fast rather
than O(N**2) slow, which will swamp those costs in situations where
long vectors are being built up.
Known issues:
Some methods are private because they haven't yet been tested properly.
If an element has not been set (because we skipped it), its value will
initially be 0. Shortening the vector does not clear old storage; if you
then skip values and setElementAt a higher index again, you may see old data
reappear in the truncated-and-restored section. Doing anything else would
have performance costs.
<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>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#m_blocksize">m_blocksize</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size of blocks to allocate</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#m_firstFree">m_firstFree</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of bytes in array</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;byte[][]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#m_map">m_map</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Array of arrays of bytes</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#m_map0">m_map0</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Shortcut" handle to m_map[0]</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#m_numblocks">m_numblocks</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of blocks to (over)allocate by</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><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#SuballocatedByteVector()">SuballocatedByteVector</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#SuballocatedByteVector(int)">SuballocatedByteVector</A></B>(int&nbsp;blocksize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a ByteVector, using the given block size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#SuballocatedByteVector(int, int)">SuballocatedByteVector</A></B>(int&nbsp;blocksize,
int&nbsp;increaseSize)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a ByteVector, using the given block size.</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/SuballocatedByteVector.html#addElement(byte)">addElement</A></B>(byte&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append a byte onto the vector.</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/SuballocatedByteVector.html#addElements(byte, int)">addElements</A></B>(byte&nbsp;value,
int&nbsp;numberOfElements)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append several byte values onto the vector.</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/SuballocatedByteVector.html#addElements(int)">addElements</A></B>(int&nbsp;numberOfElements)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append several slots onto the vector, but do not set the values.</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/utils/SuballocatedByteVector.html#contains(byte)">contains</A></B>(byte&nbsp;s)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tell if the table contains the given node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#elementAt(int)">elementAt</A></B>(int&nbsp;i)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the nth element.</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/SuballocatedByteVector.html#indexOf(byte)">indexOf</A></B>(byte&nbsp;elem)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Searches for the first occurence of the given argument,
beginning the search at index, and testing for equality
using the equals 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/SuballocatedByteVector.html#indexOf(byte, int)">indexOf</A></B>(byte&nbsp;elem,
int&nbsp;index)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Searches for the first occurence of the given argument,
beginning the search at index, and testing for equality
using the equals method.</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/SuballocatedByteVector.html#insertElementAt(byte, int)">insertElementAt</A></B>(byte&nbsp;value,
int&nbsp;at)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inserts the specified node in this vector at the specified index.</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/utils/SuballocatedByteVector.html#lastIndexOf(byte)">lastIndexOf</A></B>(byte&nbsp;elem)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Searches for the first occurence of the given argument,
beginning the search at index, and testing for equality
using the equals method.</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/SuballocatedByteVector.html#removeAllElements()">removeAllElements</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Wipe it out.</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/utils/SuballocatedByteVector.html#removeElement(byte)">removeElement</A></B>(byte&nbsp;s)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the first occurrence of the argument from this vector.</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/SuballocatedByteVector.html#removeElementAt(int)">removeElementAt</A></B>(int&nbsp;at)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes the component at the specified index.</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/SuballocatedByteVector.html#setElementAt(byte, int)">setElementAt</A></B>(byte&nbsp;value,
int&nbsp;at)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the component at the specified index of this vector to be the
specified object.</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/SuballocatedByteVector.html#setSize(int)">setSize</A></B>(int&nbsp;sz)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the length of the list.</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/SuballocatedByteVector.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>
</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_blocksize"><!-- --></A><H3>
m_blocksize</H3>
<PRE>
protected int <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.47"><B>m_blocksize</B></A></PRE>
<DL>
<DD>Size of blocks to allocate
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_numblocks"><!-- --></A><H3>
m_numblocks</H3>
<PRE>
protected int <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.50"><B>m_numblocks</B></A></PRE>
<DL>
<DD>Number of blocks to (over)allocate by
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_map"><!-- --></A><H3>
m_map</H3>
<PRE>
protected byte[][] <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.53"><B>m_map</B></A></PRE>
<DL>
<DD>Array of arrays of bytes
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_firstFree"><!-- --></A><H3>
m_firstFree</H3>
<PRE>
protected int <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.56"><B>m_firstFree</B></A></PRE>
<DL>
<DD>Number of bytes in array
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_map0"><!-- --></A><H3>
m_map0</H3>
<PRE>
protected byte[] <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.59"><B>m_map0</B></A></PRE>
<DL>
<DD>"Shortcut" handle to m_map[0]
<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="SuballocatedByteVector()"><!-- --></A><H3>
SuballocatedByteVector</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.65"><B>SuballocatedByteVector</B></A>()</PRE>
<DL>
<DD>Default constructor. Note that the default
block size is very small, for small lists.
<P>
</DL>
<HR>
<A NAME="SuballocatedByteVector(int)"><!-- --></A><H3>
SuballocatedByteVector</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.75"><B>SuballocatedByteVector</B></A>(int&nbsp;blocksize)</PRE>
<DL>
<DD>Construct a ByteVector, using the given block size.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>blocksize</CODE> - Size of block to allocate</DL>
</DL>
<HR>
<A NAME="SuballocatedByteVector(int, int)"><!-- --></A><H3>
SuballocatedByteVector</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.88"><B>SuballocatedByteVector</B></A>(int&nbsp;blocksize,
int&nbsp;increaseSize)</PRE>
<DL>
<DD>Construct a ByteVector, using the given block size.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>blocksize</CODE> - Size of block to allocate</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="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.100"><B>size</B></A>()</PRE>
<DL>
<DD>Get the length of the list.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>length of the list</DL>
</DD>
</DL>
<HR>
<A NAME="setSize(int)"><!-- --></A><H3>
setSize</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.110"><B>setSize</B></A>(int&nbsp;sz)</PRE>
<DL>
<DD>Set the length of the list.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addElement(byte)"><!-- --></A><H3>
addElement</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.121"><B>addElement</B></A>(byte&nbsp;value)</PRE>
<DL>
<DD>Append a byte onto the vector.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - Byte to add to the list</DL>
</DD>
</DL>
<HR>
<A NAME="addElements(byte, int)"><!-- --></A><H3>
addElements</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.150"><B>addElements</B></A>(byte&nbsp;value,
int&nbsp;numberOfElements)</PRE>
<DL>
<DD>Append several byte values onto the vector.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - Byte to add to the list</DL>
</DD>
</DL>
<HR>
<A NAME="addElements(int)"><!-- --></A><H3>
addElements</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.191"><B>addElements</B></A>(int&nbsp;numberOfElements)</PRE>
<DL>
<DD>Append several slots onto the vector, but do not set the values.
Note: "Not Set" means the value is unspecified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>numberOfElements</CODE> - </DL>
</DD>
</DL>
<HR>
<A NAME="insertElementAt(byte, int)"><!-- --></A><H3>
insertElementAt</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.215"><B>insertElementAt</B></A>(byte&nbsp;value,
int&nbsp;at)</PRE>
<DL>
<DD>Inserts the specified node in this vector at the specified index.
Each component in this vector with an index greater or equal to
the specified index is shifted upward to have an index one greater
than the value it had previously.
Insertion may be an EXPENSIVE operation!
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - Byte to insert<DD><CODE>at</CODE> - Index of where to insert</DL>
</DD>
</DL>
<HR>
<A NAME="removeAllElements()"><!-- --></A><H3>
removeAllElements</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.270"><B>removeAllElements</B></A>()</PRE>
<DL>
<DD>Wipe it out.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeElement(byte)"><!-- --></A><H3>
removeElement</H3>
<PRE>
private boolean <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.286"><B>removeElement</B></A>(byte&nbsp;s)</PRE>
<DL>
<DD>Removes the first occurrence of the argument from this vector.
If the object is found in this vector, each component in the vector
with an index greater or equal to the object's index is shifted
downward to have an index one smaller than the value it had
previously.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - Byte to remove from array
<DT><B>Returns:</B><DD>True if the byte was removed, false if it was not found</DL>
</DD>
</DL>
<HR>
<A NAME="removeElementAt(int)"><!-- --></A><H3>
removeElementAt</H3>
<PRE>
private void <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.303"><B>removeElementAt</B></A>(int&nbsp;at)</PRE>
<DL>
<DD>Deletes the component at the specified index. Each component in
this vector with an index greater or equal to the specified
index is shifted downward to have an index one smaller than
the value it had previously.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>at</CODE> - index of where to remove a byte</DL>
</DD>
</DL>
<HR>
<A NAME="setElementAt(byte, int)"><!-- --></A><H3>
setElementAt</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.345"><B>setElementAt</B></A>(byte&nbsp;value,
int&nbsp;at)</PRE>
<DL>
<DD>Sets the component at the specified index of this vector to be the
specified object. The previous component at that position is discarded.
The index must be a value greater than or equal to 0 and less
than the current size of the vector.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - <DD><CODE>at</CODE> - Index of where to set the object</DL>
</DD>
</DL>
<HR>
<A NAME="elementAt(int)"><!-- --></A><H3>
elementAt</H3>
<PRE>
public byte <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.394"><B>elementAt</B></A>(int&nbsp;i)</PRE>
<DL>
<DD>Get the nth element. This is often at the innermost loop of an
application, so performance is critical.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - index of value to get
<DT><B>Returns:</B><DD>value at given index. If that value wasn't previously set,
the result is undefined for performance reasons. It may throw an
exception (see below), may return zero, or (if setSize has previously
been used) may return stale data.
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if the index was _clearly_
unreasonable (negative, or past the highest block).
<DD><CODE>java.lang.NullPointerException</CODE> - if the index points to a block that could
have existed (based on the highest index used) but has never had anything
set into it.
%REVIEW% Could add a catch to create the block in that case, or return 0.
Try/Catch is _supposed_ to be nearly free when not thrown to. Do we
believe that? Should we have a separate safeElementAt?</DL>
</DD>
</DL>
<HR>
<A NAME="contains(byte)"><!-- --></A><H3>
contains</H3>
<PRE>
private boolean <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.411"><B>contains</B></A>(byte&nbsp;s)</PRE>
<DL>
<DD>Tell if the table contains the given node.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - object to look for
<DT><B>Returns:</B><DD>true if the object is in the list</DL>
</DD>
</DL>
<HR>
<A NAME="indexOf(byte, int)"><!-- --></A><H3>
indexOf</H3>
<PRE>
public int <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.427"><B>indexOf</B></A>(byte&nbsp;elem,
int&nbsp;index)</PRE>
<DL>
<DD>Searches for the first occurence of the given argument,
beginning the search at index, and testing for equality
using the equals method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elem</CODE> - object to look for<DD><CODE>index</CODE> - Index of where to begin search
<DT><B>Returns:</B><DD>the index of the first occurrence of the object
argument in this vector at position index or later in the
vector; returns -1 if the object is not found.</DL>
</DD>
</DL>
<HR>
<A NAME="indexOf(byte)"><!-- --></A><H3>
indexOf</H3>
<PRE>
public int <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.466"><B>indexOf</B></A>(byte&nbsp;elem)</PRE>
<DL>
<DD>Searches for the first occurence of the given argument,
beginning the search at index, and testing for equality
using the equals method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elem</CODE> - object to look for
<DT><B>Returns:</B><DD>the index of the first occurrence of the object
argument in this vector at position index or later in the
vector; returns -1 if the object is not found.</DL>
</DD>
</DL>
<HR>
<A NAME="lastIndexOf(byte)"><!-- --></A><H3>
lastIndexOf</H3>
<PRE>
private int <A HREF="../../../../src-html/org/apache/xml/utils/SuballocatedByteVector.html#line.481"><B>lastIndexOf</B></A>(byte&nbsp;elem)</PRE>
<DL>
<DD>Searches for the first occurence of the given argument,
beginning the search at index, and testing for equality
using the equals method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elem</CODE> - Object to look for
<DT><B>Returns:</B><DD>the index of the first occurrence of the object
argument in this vector at position index or later in the
vector; returns -1 if the object is not found.</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/SuballocatedByteVector.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/StylesheetPIHandler.html" title="class in org.apache.xml.utils"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xml/utils/SuballocatedIntVector.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/SuballocatedByteVector.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SuballocatedByteVector.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>