mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
1226 lines
48 KiB
HTML
1226 lines
48 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc on Sun Aug 01 23:07:09 MDT 1999 -->
|
|
<TITLE>
|
|
: Class StringBuf
|
|
</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" ID="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="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" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../calypso/util/SignedInteger.html"><B>PREV CLASS</B></A>
|
|
<A HREF="../../calypso/util/StringUtils.html"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
|
<A HREF="StringBuf.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" ID="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">
|
|
calypso.util</FONT>
|
|
<BR>
|
|
Class StringBuf</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
|
|
|
+--<B>calypso.util.StringBuf</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT>public final class <B>StringBuf</B><DT>extends java.lang.Object</DL>
|
|
|
|
<P>
|
|
This class is similar to java/lang/StringBuffer with the following changes:
|
|
<UL><LI>None of the methods are synchronized
|
|
<LI>There is no sharing of the character array
|
|
<LI>Converting to a String requires a copy of the character data
|
|
<LI>Alloc and Recycle are provided to speed up allocation
|
|
<LI>A bunch of useful operations are provided (comparisons, etc.)
|
|
</UL>
|
|
<P>
|
|
<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" ID="TableHeadingColor">
|
|
<TD COLSPAN=2><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#StringBuf()">StringBuf</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Constructs an empty String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#StringBuf(char[], int, int)">StringBuf</A></B>(char[] chars,
|
|
int offset,
|
|
int length)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#StringBuf(int)">StringBuf</A></B>(int length)</CODE>
|
|
|
|
<BR>
|
|
Constructs an empty String buffer with the specified initial length.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#StringBuf(java.lang.String)">StringBuf</A></B>(java.lang.String str)</CODE>
|
|
|
|
<BR>
|
|
Constructs a String buffer with the specified initial value.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=2><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#Alloc()">Alloc</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Constructs an empty String buffer, reusing one from the
|
|
recycler.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(boolean)">append</A></B>(boolean b)</CODE>
|
|
|
|
<BR>
|
|
Appends a boolean to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(char)">append</A></B>(char c)</CODE>
|
|
|
|
<BR>
|
|
Appends a character to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(char[])">append</A></B>(char[] str)</CODE>
|
|
|
|
<BR>
|
|
Appends an array of characters to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(char[], int, int)">append</A></B>(char[] str,
|
|
int offset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
Appends a part of an array of characters to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(double)">append</A></B>(double d)</CODE>
|
|
|
|
<BR>
|
|
Appends a double to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(float)">append</A></B>(float f)</CODE>
|
|
|
|
<BR>
|
|
Appends a float to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(int)">append</A></B>(int i)</CODE>
|
|
|
|
<BR>
|
|
Appends an integer to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(long)">append</A></B>(long l)</CODE>
|
|
|
|
<BR>
|
|
Appends a long to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(java.lang.Object)">append</A></B>(java.lang.Object obj)</CODE>
|
|
|
|
<BR>
|
|
Appends an object to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#append(java.lang.String)">append</A></B>(java.lang.String str)</CODE>
|
|
|
|
<BR>
|
|
Appends a String to the end of this buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#assign(char[])">assign</A></B>(char[] str)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#assign(char[], int, int)">assign</A></B>(char[] str,
|
|
int offset,
|
|
int len)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#assign(java.lang.String)">assign</A></B>(java.lang.String str)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#capacity()">capacity</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the current capacity of the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> char</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#charAt(int)">charAt</A></B>(int index)</CODE>
|
|
|
|
<BR>
|
|
Returns the character at the specified index.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#compressWhitespace(boolean)">compressWhitespace</A></B>(boolean aStripLeadingWhitespace)</CODE>
|
|
|
|
<BR>
|
|
Compress the whitespace present in the buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#EmptyRecycler()">EmptyRecycler</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Empty the recycler discarding any cached StringBuf objects</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#ensureCapacity(int)">ensureCapacity</A></B>(int minimumCapacity)</CODE>
|
|
|
|
<BR>
|
|
Ensures that the capacity of the buffer is at least equal to the
|
|
specified minimum.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object aObject)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#equals(java.lang.String)">equals</A></B>(java.lang.String anotherString)</CODE>
|
|
|
|
<BR>
|
|
Compares this StringBuf to another String.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#equals(calypso.util.StringBuf)">equals</A></B>(<A HREF="../../calypso/util/StringBuf.html">StringBuf</A> anotherString)</CODE>
|
|
|
|
<BR>
|
|
Compares this StringBuf to another StringBuf.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#equalsIgnoreCase(int, int, java.lang.String)">equalsIgnoreCase</A></B>(int aStart,
|
|
int aLength,
|
|
java.lang.String anotherString)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#equalsIgnoreCase(java.lang.String)">equalsIgnoreCase</A></B>(java.lang.String anotherString)</CODE>
|
|
|
|
<BR>
|
|
Compares this StringBuf to another String.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#equalsIgnoreCase(calypso.util.StringBuf)">equalsIgnoreCase</A></B>(<A HREF="../../calypso/util/StringBuf.html">StringBuf</A> anotherString)</CODE>
|
|
|
|
<BR>
|
|
Compares this StringBuf to another StringBuf.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#getChars(int, int, char[], int)">getChars</A></B>(int srcBegin,
|
|
int srcEnd,
|
|
char[] dst,
|
|
int dstBegin)</CODE>
|
|
|
|
<BR>
|
|
Copies the characters of the specified substring (determined by
|
|
srcBegin and srcEnd) into the character array, starting at the
|
|
array's dstBegin location.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#indexOf(int)">indexOf</A></B>(int ch)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#indexOf(int, int)">indexOf</A></B>(int ch,
|
|
int fromIndex)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, boolean)">insert</A></B>(int offset,
|
|
boolean b)</CODE>
|
|
|
|
<BR>
|
|
Inserts a boolean into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, char)">insert</A></B>(int offset,
|
|
char c)</CODE>
|
|
|
|
<BR>
|
|
Inserts a character into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, char[])">insert</A></B>(int offset,
|
|
char[] str)</CODE>
|
|
|
|
<BR>
|
|
Inserts an array of characters into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, double)">insert</A></B>(int offset,
|
|
double d)</CODE>
|
|
|
|
<BR>
|
|
Inserts a double into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, float)">insert</A></B>(int offset,
|
|
float f)</CODE>
|
|
|
|
<BR>
|
|
Inserts a float into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, int)">insert</A></B>(int offset,
|
|
int i)</CODE>
|
|
|
|
<BR>
|
|
Inserts an integer into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, long)">insert</A></B>(int offset,
|
|
long l)</CODE>
|
|
|
|
<BR>
|
|
Inserts a long into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, java.lang.Object)">insert</A></B>(int offset,
|
|
java.lang.Object obj)</CODE>
|
|
|
|
<BR>
|
|
Inserts an object into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#insert(int, java.lang.String)">insert</A></B>(int offset,
|
|
java.lang.String str)</CODE>
|
|
|
|
<BR>
|
|
Inserts a String into the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#isWhitespace()">isWhitespace</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Return true if the string buffer contains nothing but whitespace
|
|
as defined by Character.isWhitespace()</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#length()">length</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the length (character count) of the buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#Recycle(calypso.util.StringBuf)">Recycle</A></B>(<A HREF="../../calypso/util/StringBuf.html">StringBuf</A> aBuf)</CODE>
|
|
|
|
<BR>
|
|
Release a StringBuf to the recycler.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#remove(int)">remove</A></B>(int fromIndex)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#remove(int, int)">remove</A></B>(int fromIndex,
|
|
int toIndex)</CODE>
|
|
|
|
<BR>
|
|
Remove characters from the StringBuf starting at fromIndex and up
|
|
to but not including toIndex.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../calypso/util/StringBuf.html">StringBuf</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#reverse()">reverse</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Reverse the order of the characters in the String buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#setCharAt(int, char)">setCharAt</A></B>(int index,
|
|
char ch)</CODE>
|
|
|
|
<BR>
|
|
Changes the character at the specified index to be ch.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#setEmpty()">setEmpty</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Clear the content for reuse.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#setLength(int)">setLength</A></B>(int newLength)</CODE>
|
|
|
|
<BR>
|
|
Sets the length of the String.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> char[]</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#toChars()">toChars</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#toLowerCase()">toLowerCase</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.String</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#toString()">toString</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Converts to a String representing the data in the buffer.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../calypso/util/StringBuf.html#toUpperCase()">toUpperCase</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</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" ID="TableSubHeadingColor">
|
|
<TD><B>Methods inherited from class java.lang.Object</B></TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" ID="TableRowColor">
|
|
<TD><CODE>clone,
|
|
finalize,
|
|
getClass,
|
|
hashCode,
|
|
notify,
|
|
notifyAll,
|
|
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" ID="TableHeadingColor">
|
|
<TD COLSPAN=1><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="StringBuf()"><!-- --></A><H3>
|
|
StringBuf</H3>
|
|
<PRE>
|
|
public <B>StringBuf</B>()</PRE>
|
|
<DL>
|
|
<DD>Constructs an empty String buffer.</DL>
|
|
<HR>
|
|
|
|
<A NAME="StringBuf(int)"><!-- --></A><H3>
|
|
StringBuf</H3>
|
|
<PRE>
|
|
public <B>StringBuf</B>(int length)</PRE>
|
|
<DL>
|
|
<DD>Constructs an empty String buffer with the specified initial length.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>length</CODE> - the initial length</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="StringBuf(java.lang.String)"><!-- --></A><H3>
|
|
StringBuf</H3>
|
|
<PRE>
|
|
public <B>StringBuf</B>(java.lang.String str)</PRE>
|
|
<DL>
|
|
<DD>Constructs a String buffer with the specified initial value.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the initial value of the buffer</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="StringBuf(char[], int, int)"><!-- --></A><H3>
|
|
StringBuf</H3>
|
|
<PRE>
|
|
public <B>StringBuf</B>(char[] chars,
|
|
int offset,
|
|
int length)</PRE>
|
|
<DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
|
<TR BGCOLOR="#CCCCFF" ID="TableHeadingColor">
|
|
<TD COLSPAN=1><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="Alloc()"><!-- --></A><H3>
|
|
Alloc</H3>
|
|
<PRE>
|
|
public static <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>Alloc</B>()</PRE>
|
|
<DL>
|
|
<DD>Constructs an empty String buffer, reusing one from the
|
|
recycler.</DL>
|
|
<HR>
|
|
|
|
<A NAME="Recycle(calypso.util.StringBuf)"><!-- --></A><H3>
|
|
Recycle</H3>
|
|
<PRE>
|
|
public static void <B>Recycle</B>(<A HREF="../../calypso/util/StringBuf.html">StringBuf</A> aBuf)</PRE>
|
|
<DL>
|
|
<DD>Release a StringBuf to the recycler. It is up to the caller
|
|
to ensure that buffer is no longer being used otherwise
|
|
unpredicatable program behavior will result.</DL>
|
|
<HR>
|
|
|
|
<A NAME="EmptyRecycler()"><!-- --></A><H3>
|
|
EmptyRecycler</H3>
|
|
<PRE>
|
|
public static void <B>EmptyRecycler</B>()</PRE>
|
|
<DL>
|
|
<DD>Empty the recycler discarding any cached StringBuf objects</DL>
|
|
<HR>
|
|
|
|
<A NAME="length()"><!-- --></A><H3>
|
|
length</H3>
|
|
<PRE>
|
|
public int <B>length</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the length (character count) of the buffer.</DL>
|
|
<HR>
|
|
|
|
<A NAME="capacity()"><!-- --></A><H3>
|
|
capacity</H3>
|
|
<PRE>
|
|
public int <B>capacity</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the current capacity of the String buffer. The capacity
|
|
is the amount of storage available for newly inserted
|
|
characters; beyond which an allocation will occur.</DL>
|
|
<HR>
|
|
|
|
<A NAME="ensureCapacity(int)"><!-- --></A><H3>
|
|
ensureCapacity</H3>
|
|
<PRE>
|
|
public void <B>ensureCapacity</B>(int minimumCapacity)</PRE>
|
|
<DL>
|
|
<DD>Ensures that the capacity of the buffer is at least equal to the
|
|
specified minimum.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>minimumCapacity</CODE> - the minimum desired capacity</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setLength(int)"><!-- --></A><H3>
|
|
setLength</H3>
|
|
<PRE>
|
|
public void <B>setLength</B>(int newLength)</PRE>
|
|
<DL>
|
|
<DD>Sets the length of the String. If the length is reduced, characters
|
|
are lost. If the length is extended, the values of the new characters
|
|
are set to 0.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>newLength</CODE> - the new length of the buffer<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the length is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setEmpty()"><!-- --></A><H3>
|
|
setEmpty</H3>
|
|
<PRE>
|
|
public void <B>setEmpty</B>()</PRE>
|
|
<DL>
|
|
<DD>Clear the content for reuse. Farster than setLength(0).</DL>
|
|
<HR>
|
|
|
|
<A NAME="charAt(int)"><!-- --></A><H3>
|
|
charAt</H3>
|
|
<PRE>
|
|
public char <B>charAt</B>(int index)</PRE>
|
|
<DL>
|
|
<DD>Returns the character at the specified index. An index ranges
|
|
from 0..length()-1.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the desired character<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the index is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getChars(int, int, char[], int)"><!-- --></A><H3>
|
|
getChars</H3>
|
|
<PRE>
|
|
public void <B>getChars</B>(int srcBegin,
|
|
int srcEnd,
|
|
char[] dst,
|
|
int dstBegin)</PRE>
|
|
<DL>
|
|
<DD>Copies the characters of the specified substring (determined by
|
|
srcBegin and srcEnd) into the character array, starting at the
|
|
array's dstBegin location. Both srcBegin and srcEnd must be legal
|
|
indexes into the buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>srcBegin</CODE> - begin copy at this offset in the String<DD><CODE>srcEnd</CODE> - stop copying at this offset in the String<DD><CODE>dst</CODE> - the array to copy the data into<DD><CODE>dstBegin</CODE> - offset into dst<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If there is an invalid index into the buffer.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setCharAt(int, char)"><!-- --></A><H3>
|
|
setCharAt</H3>
|
|
<PRE>
|
|
public void <B>setCharAt</B>(int index,
|
|
char ch)</PRE>
|
|
<DL>
|
|
<DD>Changes the character at the specified index to be ch.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the character<DD><CODE>ch</CODE> - the new character<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the index is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(java.lang.Object)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(java.lang.Object obj)</PRE>
|
|
<DL>
|
|
<DD>Appends an object to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(java.lang.String)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(java.lang.String str)</PRE>
|
|
<DL>
|
|
<DD>Appends a String to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the String to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(char[])"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(char[] str)</PRE>
|
|
<DL>
|
|
<DD>Appends an array of characters to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the characters to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="assign(char[])"><!-- --></A><H3>
|
|
assign</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>assign</B>(char[] str)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="assign(java.lang.String)"><!-- --></A><H3>
|
|
assign</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>assign</B>(java.lang.String str)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="assign(char[], int, int)"><!-- --></A><H3>
|
|
assign</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>assign</B>(char[] str,
|
|
int offset,
|
|
int len)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(char[], int, int)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(char[] str,
|
|
int offset,
|
|
int len)</PRE>
|
|
<DL>
|
|
<DD>Appends a part of an array of characters to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>str</CODE> - the characters to be appended<DD><CODE>offset</CODE> - where to start<DD><CODE>len</CODE> - the number of characters to add<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(boolean)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(boolean b)</PRE>
|
|
<DL>
|
|
<DD>Appends a boolean to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the boolean to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(char)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(char c)</PRE>
|
|
<DL>
|
|
<DD>Appends a character to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>ch</CODE> - the character to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(int)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(int i)</PRE>
|
|
<DL>
|
|
<DD>Appends an integer to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the integer to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(long)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(long l)</PRE>
|
|
<DL>
|
|
<DD>Appends a long to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>l</CODE> - the long to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(float)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(float f)</PRE>
|
|
<DL>
|
|
<DD>Appends a float to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>f</CODE> - the float to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="append(double)"><!-- --></A><H3>
|
|
append</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>append</B>(double d)</PRE>
|
|
<DL>
|
|
<DD>Appends a double to the end of this buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>d</CODE> - the double to be appended<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, java.lang.Object)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
java.lang.Object obj)</PRE>
|
|
<DL>
|
|
<DD>Inserts an object into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>obj</CODE> - the object to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, java.lang.String)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
java.lang.String str)</PRE>
|
|
<DL>
|
|
<DD>Inserts a String into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>str</CODE> - the String to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, char[])"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
char[] str)</PRE>
|
|
<DL>
|
|
<DD>Inserts an array of characters into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>str</CODE> - the characters to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, boolean)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
boolean b)</PRE>
|
|
<DL>
|
|
<DD>Inserts a boolean into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>b</CODE> - the boolean to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, char)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
char c)</PRE>
|
|
<DL>
|
|
<DD>Inserts a character into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>ch</CODE> - the character to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, int)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
int i)</PRE>
|
|
<DL>
|
|
<DD>Inserts an integer into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>i</CODE> - the integer to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, long)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
long l)</PRE>
|
|
<DL>
|
|
<DD>Inserts a long into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>l</CODE> - the long to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, float)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
float f)</PRE>
|
|
<DL>
|
|
<DD>Inserts a float into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>f</CODE> - the float to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="insert(int, double)"><!-- --></A><H3>
|
|
insert</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>insert</B>(int offset,
|
|
double d)</PRE>
|
|
<DL>
|
|
<DD>Inserts a double into the String buffer.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>offset</CODE> - the offset at which to insert<DD><CODE>d</CODE> - the double to insert<DT><B>Returns:</B><DD>the StringBuf itself, NOT a new one.<DT><B>Throws:</B><DD>StringIndexOutOfBoundsException - If the offset is invalid.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="reverse()"><!-- --></A><H3>
|
|
reverse</H3>
|
|
<PRE>
|
|
public <A HREF="../../calypso/util/StringBuf.html">StringBuf</A> <B>reverse</B>()</PRE>
|
|
<DL>
|
|
<DD>Reverse the order of the characters in the String buffer.</DL>
|
|
<HR>
|
|
|
|
<A NAME="toUpperCase()"><!-- --></A><H3>
|
|
toUpperCase</H3>
|
|
<PRE>
|
|
public void <B>toUpperCase</B>()</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toLowerCase()"><!-- --></A><H3>
|
|
toLowerCase</H3>
|
|
<PRE>
|
|
public void <B>toLowerCase</B>()</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toString()"><!-- --></A><H3>
|
|
toString</H3>
|
|
<PRE>
|
|
public java.lang.String <B>toString</B>()</PRE>
|
|
<DL>
|
|
<DD>Converts to a String representing the data in the buffer.<DD><DL>
|
|
<DT><B>Overrides:</B><DD>toString in class java.lang.Object</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toChars()"><!-- --></A><H3>
|
|
toChars</H3>
|
|
<PRE>
|
|
public char[] <B>toChars</B>()</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="compressWhitespace(boolean)"><!-- --></A><H3>
|
|
compressWhitespace</H3>
|
|
<PRE>
|
|
public void <B>compressWhitespace</B>(boolean aStripLeadingWhitespace)</PRE>
|
|
<DL>
|
|
<DD>Compress the whitespace present in the buffer.
|
|
XXX I suppose there are i18n issues with this after all a space is
|
|
probably not a space...</DL>
|
|
<HR>
|
|
|
|
<A NAME="isWhitespace()"><!-- --></A><H3>
|
|
isWhitespace</H3>
|
|
<PRE>
|
|
public boolean <B>isWhitespace</B>()</PRE>
|
|
<DL>
|
|
<DD>Return true if the string buffer contains nothing but whitespace
|
|
as defined by Character.isWhitespace()</DL>
|
|
<HR>
|
|
|
|
<A NAME="equalsIgnoreCase(java.lang.String)"><!-- --></A><H3>
|
|
equalsIgnoreCase</H3>
|
|
<PRE>
|
|
public boolean <B>equalsIgnoreCase</B>(java.lang.String anotherString)</PRE>
|
|
<DL>
|
|
<DD>Compares this StringBuf to another String. Returns true if the
|
|
String is equal to this StringBuf; that is, has the same length
|
|
and the same characters in the same sequence. Upper case
|
|
characters are folded to lower case before they are compared.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>anotherString</CODE> - the String to compare this String against<DT><B>Returns:</B><DD>true if the Strings are equal, ignoring case; false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equalsIgnoreCase(int, int, java.lang.String)"><!-- --></A><H3>
|
|
equalsIgnoreCase</H3>
|
|
<PRE>
|
|
public boolean <B>equalsIgnoreCase</B>(int aStart,
|
|
int aLength,
|
|
java.lang.String anotherString)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equalsIgnoreCase(calypso.util.StringBuf)"><!-- --></A><H3>
|
|
equalsIgnoreCase</H3>
|
|
<PRE>
|
|
public boolean <B>equalsIgnoreCase</B>(<A HREF="../../calypso/util/StringBuf.html">StringBuf</A> anotherString)</PRE>
|
|
<DL>
|
|
<DD>Compares this StringBuf to another StringBuf. Returns true if the
|
|
other StringBuf is equal to this StringBuf; that is, has the same length
|
|
and the same characters in the same sequence. Upper case
|
|
characters are folded to lower case before they are compared.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>anotherString</CODE> - the String to compare this String against<DT><B>Returns:</B><DD>true if the Strings are equal, ignoring case; false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
|
|
equals</H3>
|
|
<PRE>
|
|
public boolean <B>equals</B>(java.lang.Object aObject)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
<DT><B>Overrides:</B><DD>equals in class java.lang.Object</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equals(calypso.util.StringBuf)"><!-- --></A><H3>
|
|
equals</H3>
|
|
<PRE>
|
|
public boolean <B>equals</B>(<A HREF="../../calypso/util/StringBuf.html">StringBuf</A> anotherString)</PRE>
|
|
<DL>
|
|
<DD>Compares this StringBuf to another StringBuf. Returns true if the
|
|
other StringBuf is equal to this StringBuf; that is, has the same length
|
|
and the same characters in the same sequence.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>anotherString</CODE> - the String to compare this String against<DT><B>Returns:</B><DD>true if the Strings are equal, ignoring case; false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="equals(java.lang.String)"><!-- --></A><H3>
|
|
equals</H3>
|
|
<PRE>
|
|
public boolean <B>equals</B>(java.lang.String anotherString)</PRE>
|
|
<DL>
|
|
<DD>Compares this StringBuf to another String. Returns true if the
|
|
other String is equal to this StringBuf; that is, has the same length
|
|
and the same characters in the same sequence.<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>anotherString</CODE> - the String to compare this String against<DT><B>Returns:</B><DD>true if the Strings are equal, ignoring case; false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="indexOf(int)"><!-- --></A><H3>
|
|
indexOf</H3>
|
|
<PRE>
|
|
public int <B>indexOf</B>(int ch)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="indexOf(int, int)"><!-- --></A><H3>
|
|
indexOf</H3>
|
|
<PRE>
|
|
public int <B>indexOf</B>(int ch,
|
|
int fromIndex)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="remove(int)"><!-- --></A><H3>
|
|
remove</H3>
|
|
<PRE>
|
|
public void <B>remove</B>(int fromIndex)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="remove(int, int)"><!-- --></A><H3>
|
|
remove</H3>
|
|
<PRE>
|
|
public void <B>remove</B>(int fromIndex,
|
|
int toIndex)</PRE>
|
|
<DL>
|
|
<DD>Remove characters from the StringBuf starting at fromIndex and up
|
|
to but not including toIndex. If toIndex is beyond the length of
|
|
the StringBuf then it is automatically clamped to the end of the
|
|
StringBuf. If fromIndex is out of range a StringIndexOutOfBoundsException
|
|
is thrown.</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" ID="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev"> <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="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" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../calypso/util/SignedInteger.html"><B>PREV CLASS</B></A>
|
|
<A HREF="../../calypso/util/StringUtils.html"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
|
<A HREF="StringBuf.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" ID="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>
|
|
|
|
</BODY>
|
|
</HTML>
|