| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
| <!--NewPage-->
|
| <HTML>
|
| <HEAD>
|
| <!-- Generated by javadoc on Thu Nov 22 17:12:57 EST 2007 -->
|
| <TITLE>
|
| Xalan-Java 2.7.1: Class SuballocatedByteVector
|
| </TITLE>
|
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
|
| </HEAD>
|
| <BODY BGCOLOR="white">
|
|
|
| <!-- ========== START OF NAVBAR ========== -->
|
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
| <TR>
|
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
| <TR ALIGN="center" VALIGN="top">
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SuballocatedByteVector.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/utils/StylesheetPIHandler.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../../org/apache/xml/utils/SuballocatedIntVector.html"><B>NEXT CLASS</B></A></FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="SuballocatedByteVector.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| <!-- ======== START OF CLASS DATA ======== -->
|
| <H2>
|
| <FONT SIZE="-1">
|
| org.apache.xml.utils</FONT>
|
| <BR>
|
| Class SuballocatedByteVector</H2>
|
| <PRE>
|
| java.lang.Object
|
| |
|
| +--<B>org.apache.xml.utils.SuballocatedByteVector</B>
|
| </PRE>
|
| <HR>
|
| <DL>
|
| <DT>public class <B>SuballocatedByteVector</B><DT>extends java.lang.Object</DL>
|
|
|
| <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>
|
| <DL>
|
| <DT><B>Usage:</B><DD><i><font size="-1" color="#FF0000"> **For internal use only**</font></i></DD> |
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <P>
|
| <!-- ======== INNER CLASS SUMMARY ======== -->
|
|
|
|
|
| <!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
|
| <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=2><FONT SIZE="+2">
|
| <B>Constructor Summary</B></FONT></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#SuballocatedByteVector()">SuballocatedByteVector</A></B>()</CODE>
|
|
|
| <BR>
|
| 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 blocksize)</CODE>
|
|
|
| <BR>
|
| 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 blocksize, |
| int increaseSize)</CODE>
|
|
|
| <BR>
|
| Construct a ByteVector, using the given block size.</TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <!-- ========== METHOD SUMMARY =========== -->
|
|
|
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=2><FONT SIZE="+2">
|
| <B>Method Summary</B></FONT></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#addElement(byte)">addElement</A></B>(byte value)</CODE>
|
|
|
| <BR>
|
| Append a byte onto the vector.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> byte</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#elementAt(int)">elementAt</A></B>(int i)</CODE>
|
|
|
| <BR>
|
| Get the nth element.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> int</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#indexOf(byte)">indexOf</A></B>(byte elem)</CODE>
|
|
|
| <BR>
|
| 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> int</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#indexOf(byte, int)">indexOf</A></B>(byte elem, |
| int index)</CODE>
|
|
|
| <BR>
|
| 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> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#removeAllElements()">removeAllElements</A></B>()</CODE>
|
|
|
| <BR>
|
| Wipe it out.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#setElementAt(byte, int)">setElementAt</A></B>(byte value, |
| int at)</CODE>
|
|
|
| <BR>
|
| 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> int</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../../org/apache/xml/utils/SuballocatedByteVector.html#size()">size</A></B>()</CODE>
|
|
|
| <BR>
|
| Get the length of the list.</TD>
|
| </TR>
|
| </TABLE>
|
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
| <TD><B>Methods inherited from class java.lang.Object</B></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE>equals,
|
| getClass,
|
| hashCode,
|
| notify,
|
| notifyAll,
|
| toString,
|
| wait,
|
| wait,
|
| wait</CODE></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <P>
|
|
|
| <!-- ============ FIELD DETAIL =========== -->
|
|
|
|
|
| <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=1><FONT SIZE="+2">
|
| <B>Constructor Detail</B></FONT></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <A NAME="SuballocatedByteVector()"><!-- --></A><H3>
|
| SuballocatedByteVector</H3>
|
| <PRE>
|
| public <B>SuballocatedByteVector</B>()</PRE>
|
| <DL>
|
| <DD>Default constructor. Note that the default |
| block size is very small, for small lists.</DL>
|
| <HR>
|
|
|
| <A NAME="SuballocatedByteVector(int)"><!-- --></A><H3>
|
| SuballocatedByteVector</H3>
|
| <PRE>
|
| public <B>SuballocatedByteVector</B>(int blocksize)</PRE>
|
| <DL>
|
| <DD>Construct a ByteVector, using the given block size.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>blocksize</CODE> - Size of block to allocate</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="SuballocatedByteVector(int, int)"><!-- --></A><H3>
|
| SuballocatedByteVector</H3>
|
| <PRE>
|
| public <B>SuballocatedByteVector</B>(int blocksize, |
| int increaseSize)</PRE>
|
| <DL>
|
| <DD>Construct a ByteVector, using the given block size.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>blocksize</CODE> - Size of block to allocate</DL>
|
| </DD>
|
| </DL>
|
|
|
| <!-- ============ METHOD DETAIL ========== -->
|
|
|
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=1><FONT SIZE="+2">
|
| <B>Method Detail</B></FONT></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <A NAME="size()"><!-- --></A><H3>
|
| size</H3>
|
| <PRE>
|
| public int <B>size</B>()</PRE>
|
| <DL>
|
| <DD>Get the length of the list.<DD><DL>
|
| <DT><B>Returns:</B><DD>length of the list</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="addElement(byte)"><!-- --></A><H3>
|
| addElement</H3>
|
| <PRE>
|
| public void <B>addElement</B>(byte value)</PRE>
|
| <DL>
|
| <DD>Append a byte onto the vector.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>value</CODE> - Byte to add to the list</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="removeAllElements()"><!-- --></A><H3>
|
| removeAllElements</H3>
|
| <PRE>
|
| public void <B>removeAllElements</B>()</PRE>
|
| <DL>
|
| <DD>Wipe it out.</DL>
|
| <HR>
|
|
|
| <A NAME="setElementAt(byte, int)"><!-- --></A><H3>
|
| setElementAt</H3>
|
| <PRE>
|
| public void <B>setElementAt</B>(byte value, |
| int 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.<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 <B>elementAt</B>(int i)</PRE>
|
| <DL>
|
| <DD>Get the nth element. This is often at the innermost loop of an |
| application, so performance is critical.<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>java.lang.ArrayIndexOutOfBoundsException - if the index was _clearly_ |
| unreasonable (negative, or past the highest block).<DD>java.lang.NullPointerException - 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="indexOf(byte, int)"><!-- --></A><H3>
|
| indexOf</H3>
|
| <PRE>
|
| public int <B>indexOf</B>(byte elem, |
| int 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.<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 <B>indexOf</B>(byte 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.<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 NAVBAR ========== -->
|
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
| <TR>
|
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
| <TR ALIGN="center" VALIGN="top">
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SuballocatedByteVector.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/utils/StylesheetPIHandler.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../../org/apache/xml/utils/SuballocatedIntVector.html"><B>NEXT CLASS</B></A></FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="SuballocatedByteVector.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| Copyright © 2006 Apache XML Project. All Rights Reserved.
|
| </BODY>
|
| </HTML>
|