<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.lang.StringBuffer
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.lang.html">This Package</a>  <a href="java.lang.String.html#_top_">Previous</a>  <a href="java.lang.System.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.lang.StringBuffer
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.lang.StringBuffer
</pre>
<hr>
<dl>
  <dt> public final class <b>StringBuffer</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
A string buffer implements a mutable sequence of characters.
 <p>
 String buffers are safe for use by multiple threads. The methods
 are synchronized where necessary so that all the operations on any
 particular instance behave as if they occur in some serial order.
 <p>
 String buffers are used by the compiler to implement the binary
 string concatenation operator <code>+</code>. For example, the code:
 <p><blockquote><pre>
     x = "a" + 4 + "c"
 </pre></blockquote><p>
 is compiled to the equivalent of:
 <p><blockquote><pre>
     x = new StringBuffer().append("a").append(4).append("c")
                           .toString()
 </pre></blockquote><p>
 The principal operations on a <code>StringBuffer</code> are the
 <code>append</code> and <code>insert</code> methods, which are
 overloaded so as to accept data of any type. Each effectively
 converts a given datum to a string and then appends or inserts the
 characters of that string to the string buffer. The
 <code>append</code> method always adds these characters at the end
 of the buffer; the <code>insert</code> method adds the characters at
 a specified point.
 <p>
 For example, if <code>z</code> refers to a string buffer object
 whose current contents are "<code>start</code>", then
 the method call <code>z.append("le")</code> would cause the string
 buffer to contain "<code>startle</code>", whereas
 <code>z.insert(4, "le")</code> would alter the string buffer to
 contain "<code>starlet</code>".
 <p>
 Every string buffer has a capacity. As long as the length of the
 character sequence contained in the string buffer does not exceed
 the capacity, it is not necessary to allocate a new internal
 buffer array. If the internal buffer overflows, it is
 automatically made larger.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.ByteArrayOutputStream.html#_top_">ByteArrayOutputStream</a>, <a href="java.lang.String.html#_top_">String</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#StringBuffer()"><b>StringBuffer</b></a>()
  <dd>  Constructs a string buffer with no characters in it and an
 initial capacity of 16 characters.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#StringBuffer(int)"><b>StringBuffer</b></a>(int)
  <dd>  Constructs a string buffer with no characters in it and an
 initial capacity specified by the <code>length</code> argument.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#StringBuffer(java.lang.String)"><b>StringBuffer</b></a>(String)
  <dd>  Constructs a string buffer so that it represents the same
 sequence of characters as the string argument.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(boolean)"><b>append</b></a>(boolean)
  <dd>  Appends the string representation of the <code>boolean</code>
 argument to the string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(char)"><b>append</b></a>(char)
  <dd>  Appends the string representation of the <code>char</code>
 argument to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(char[])"><b>append</b></a>(char[])
  <dd>  Appends the string representation of the <code>char</code> array
 argument to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(char[], int, int)"><b>append</b></a>(char[], int, int)
  <dd>  Appends the string representation of a subarray of the
 <code>char</code> array argument to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(double)"><b>append</b></a>(double)
  <dd>  Appends the string representation of the <code>double</code>
 argument to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(float)"><b>append</b></a>(float)
  <dd>  Appends the string representation of the <code>float</code>
 argument to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(int)"><b>append</b></a>(int)
  <dd>  Appends the string representation of the <code>int</code>
 argument to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(long)"><b>append</b></a>(long)
  <dd>  Appends the string representation of the <code>long</code>
 argument to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(java.lang.Object)"><b>append</b></a>(Object)
  <dd>  Appends the string representation of the <code>Object</code>
 argument to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#append(java.lang.String)"><b>append</b></a>(String)
  <dd>  Appends the string to this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#capacity()"><b>capacity</b></a>()
  <dd>  Returns the current capacity of the String buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#charAt(int)"><b>charAt</b></a>(int)
  <dd>  Returns the character at a specific index in this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ensureCapacity(int)"><b>ensureCapacity</b></a>(int)
  <dd>  Ensures that the capacity of the buffer is at least equal to the
 specified minimum.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getChars(int, int, char[], int)"><b>getChars</b></a>(int, int, char[], int)
  <dd>  Characters are copied from this string buffer into the
 destination character array <code>dst</code>.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, boolean)"><b>insert</b></a>(int, boolean)
  <dd>  Inserts the string representation of the <code>boolean</code>
 argument into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, char)"><b>insert</b></a>(int, char)
  <dd>  Inserts the string representation of the <code>char</code>
 argument into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, char[])"><b>insert</b></a>(int, char[])
  <dd>  Inserts the string representation of the <code>char</code> array
 argument into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, double)"><b>insert</b></a>(int, double)
  <dd>  Inserts the string representation of the <code>double</code>
 argument into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, float)"><b>insert</b></a>(int, float)
  <dd>  Inserts the string representation of the <code>float</code>
 argument into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, int)"><b>insert</b></a>(int, int)
  <dd>  Inserts the string representation of the second <code>int</code>
 argument into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, long)"><b>insert</b></a>(int, long)
  <dd>  Inserts the string representation of the <code>long</code>
 argument into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, java.lang.Object)"><b>insert</b></a>(int, Object)
  <dd>  Inserts the string representation of the <code>Object</code>
 argument into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#insert(int, java.lang.String)"><b>insert</b></a>(int, String)
  <dd>  Inserts the string into this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#length()"><b>length</b></a>()
  <dd>  Returns the length (character count) of this string buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#reverse()"><b>reverse</b></a>()
  <dd>  The character sequence contained in this string buffer is
 replaced by the reverse of the sequence.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setCharAt(int, char)"><b>setCharAt</b></a>(int, char)
  <dd>  The character at the specified index of this string buffer is set
 to <code>ch</code>.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setLength(int)"><b>setLength</b></a>(int)
  <dd>  Sets the length of this String buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Converts to a string representing the data in this string buffer.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="StringBuffer"></a>
<a name="StringBuffer()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>StringBuffer</b>
<pre>
 public StringBuffer()
</pre>
<dl>
  <dd> Constructs a string buffer with no characters in it and an
 initial capacity of 16 characters.
<p>
</dl>
<a name="StringBuffer(int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>StringBuffer</b>
<pre>
 public StringBuffer(int length)
</pre>
<dl>
  <dd> Constructs a string buffer with no characters in it and an
 initial capacity specified by the <code>length</code> argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> length - the initial capacity.
    <dt> <b>Throws:</b> <a href="java.lang.NegativeArraySizeException.html#_top_">NegativeArraySizeException</a>
    <dd> if the <code>length</code>
               argument is less than <code>0</code>.
  </dl></dd>
</dl>
<a name="StringBuffer(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>StringBuffer</b>
<pre>
 public StringBuffer(<a href="java.lang.String.html#_top_">String</a> str)
</pre>
<dl>
  <dd> Constructs a string buffer so that it represents the same
 sequence of characters as the string argument. The initial
 capacity of the string buffer is <code>16</code> plus the length
 of the string argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - the initial contents of the buffer.
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="length()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="length"><b>length</b></a>
<pre>
 public int length()
</pre>
<dl>
  <dd> Returns the length (character count) of this string buffer.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the number of characters in this string buffer.
  </dl></dd>
</dl>
<a name="capacity()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="capacity"><b>capacity</b></a>
<pre>
 public int capacity()
</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.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the current capacity of this string buffer.
  </dl></dd>
</dl>
<a name="ensureCapacity(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="ensureCapacity"><b>ensureCapacity</b></a>
<pre>
 public synchronized void ensureCapacity(int minimumCapacity)
</pre>
<dl>
  <dd> Ensures that the capacity of the buffer is at least equal to the
 specified minimum.
 If the current capacity of this string buffer is less than the
 argument, then a new internal buffer is allocated with greater
 capacity. The new capacity is the larger of:
 <ul>
 <li>The <code>minimumCapacity</code> argument.
 <li>Twice the old capacity, plus <code>2</code>.
 </ul>
 If the <code>minimumCapacity</code> argument is nonpositive, this
 method takes no action and simply returns.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> minimumCapacity - the minimum desired capacity.
  </dl></dd>
</dl>
<a name="setLength(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setLength"><b>setLength</b></a>
<pre>
 public synchronized void setLength(int newLength)
</pre>
<dl>
  <dd> Sets the length of this String buffer.
 If the <code>newLength</code> argument is less than the current
 length of the string buffer, the string buffer is truncated to
 contain exactly the number of characters given by the
 <code>newLength</code> argument.
 <p>
 If the <code>newLength</code> argument is greater than or equal
 to the current length, sufficient null characters
 (<code>'&#92;u0000'</code>) are appended to the string buffer so that
 length becomes the <code>newLength</code> argument.
 <p>
 The <code>newLength</code> argument must be greater than or equal
 to <code>0</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> newLength - the new length of the buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the
               <code>newLength</code> argument is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="charAt(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="charAt"><b>charAt</b></a>
<pre>
 public synchronized char charAt(int index)
</pre>
<dl>
  <dd> Returns the character at a specific index in this string buffer.
 <p>
 The first character of a string buffer is at index
 <code>0</code>, the next at index <code>1</code>, and so on, for
 array indexing.
 <p>
 The index argument must be greater than or equal to
 <code>0</code>, and less than the length of this string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> index - the index of the desired character.
    <dt> <b>Returns:</b>
    <dd> the character at the specified index of this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the index is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="getChars(int, int, char[], int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getChars"><b>getChars</b></a>
<pre>
 public synchronized void getChars(int srcBegin,
                                   int srcEnd,
                                   char dst[],
                                   int dstBegin)
</pre>
<dl>
  <dd> Characters are copied from this string buffer into the
 destination character array <code>dst</code>. The first character to
 be copied is at index <code>srcBegin</code>; the last character to
 be copied is at index <code>srcEnd-1.</code> The total number of
 characters to be copied is <code>srcEnd-srcBegin</code>. The
 characters are copied into the subarray of <code>dst</code> starting
 at index <code>dstBegin</code> and ending at index:
 <p><blockquote><pre>
     dstbegin + (srcEnd-srcBegin) - 1
 </pre></blockquote>
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> srcBegin - start copying at this offset in the string buffer.
    <dd> srcEnd - stop copying at this offset in the string buffer.
    <dd> dst - the array to copy the data into.
    <dd> dstBegin - offset into <code>dst</code>.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if there is an invalid
               index into the buffer.
  </dl></dd>
</dl>
<a name="setCharAt(int, char)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setCharAt"><b>setCharAt</b></a>
<pre>
 public synchronized void setCharAt(int index,
                                    char ch)
</pre>
<dl>
  <dd> The character at the specified index of this string buffer is set
 to <code>ch</code>.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than the length of this string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> index - the index of the character to modify.
    <dd> ch - the new character.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the index is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="append(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> append(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Appends the string representation of the <code>Object</code>
 argument to this string buffer.
 <p>
 The argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then appended to this string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - an <code>Object</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(java.lang.Object)">valueOf</a>, <a href="#append(java.lang.String)">append</a>
  </dl></dd>
</dl>
<a name="append(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> append(<a href="java.lang.String.html#_top_">String</a> str)
</pre>
<dl>
  <dd> Appends the string to this string buffer.
 <p>
 The characters of the <code>String</code> argument are appended, in
 order, to the contents of this string buffer, increasing the
 length of this string buffer by the length of the argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - a string.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
  </dl></dd>
</dl>
<a name="append(char[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> append(char str[])
</pre>
<dl>
  <dd> Appends the string representation of the <code>char</code> array
 argument to this string buffer.
 <p>
 The characters of the array argument are appended, in order, to
 the contents of this string buffer. The length of this string
 buffer increases by the length of the argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - the characters to be appended.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
  </dl></dd>
</dl>
<a name="append(char[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> append(char str[],
                                         int offset,
                                         int len)
</pre>
<dl>
  <dd> Appends the string representation of a subarray of the
 <code>char</code> array argument to this string buffer.
 <p>
 Characters of the character array <code>str</code>, starting at
 index <code>offset</code>, are appended, in order, to the contents
 of this string buffer. The length of this string buffer increases
 by the value of <code>len</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - the characters to be appended.
    <dd> offset - the index of the first character to append.
    <dd> len - the number of characters to append.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
  </dl></dd>
</dl>
<a name="append(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> append(boolean b)
</pre>
<dl>
  <dd> Appends the string representation of the <code>boolean</code>
 argument to the string buffer.
 <p>
 The argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then appended to this string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - a <code>boolean</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(boolean)">valueOf</a>, <a href="#append(java.lang.String)">append</a>
  </dl></dd>
</dl>
<a name="append(char)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> append(char c)
</pre>
<dl>
  <dd> Appends the string representation of the <code>char</code>
 argument to this string buffer.
 <p>
 The argument is appended to the contents of this string buffer.
 The length of this string buffer increases by <code>1</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ch - a <code>char</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
  </dl></dd>
</dl>
<a name="append(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> append(int i)
</pre>
<dl>
  <dd> Appends the string representation of the <code>int</code>
 argument to this string buffer.
 <p>
 The argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then appended to this string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> i - an <code>int</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(int)">valueOf</a>, <a href="#append(java.lang.String)">append</a>
  </dl></dd>
</dl>
<a name="append(long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> append(long l)
</pre>
<dl>
  <dd> Appends the string representation of the <code>long</code>
 argument to this string buffer.
 <p>
 The argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then appended to this string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> l - a <code>long</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(long)">valueOf</a>, <a href="#append(java.lang.String)">append</a>
  </dl></dd>
</dl>
<a name="append(float)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> append(float f)
</pre>
<dl>
  <dd> Appends the string representation of the <code>float</code>
 argument to this string buffer.
 <p>
 The argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then appended to this string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> f - a <code>float</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(float)">valueOf</a>, <a href="#append(java.lang.String)">append</a>
  </dl></dd>
</dl>
<a name="append(double)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="append"><b>append</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> append(double d)
</pre>
<dl>
  <dd> Appends the string representation of the <code>double</code>
 argument to this string buffer.
 <p>
 The argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then appended to this string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> d - a <code>double</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(double)">valueOf</a>, <a href="#append(java.lang.String)">append</a>
  </dl></dd>
</dl>
<a name="insert(int, java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> insert(int offset,
                                         <a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Inserts the string representation of the <code>Object</code>
 argument into this string buffer.
 <p>
 The second argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then inserted into this string buffer at the indicated
 offset.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than or equal to the length of this
 string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> b - an <code>Object</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(java.lang.Object)">valueOf</a>, <a href="#insert(int, java.lang.String)">insert</a>, <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="insert(int, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> insert(int offset,
                                         <a href="java.lang.String.html#_top_">String</a> str)
</pre>
<dl>
  <dd> Inserts the string into this string buffer.
 <p>
 The characters of the <code>String</code> argument are inserted, in
 order, into this string buffer at the indicated offset. The length
 of this string buffer is increased by the length of the argument.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than or equal to the length of this
 string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> str - a string.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="insert(int, char[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> insert(int offset,
                                         char str[])
</pre>
<dl>
  <dd> Inserts the string representation of the <code>char</code> array
 argument into this string buffer.
 <p>
 The characters of the array argument are inserted into the
 contents of this string buffer at the position indicated by
 <code>offset</code>. The length of this string buffer increases by
 the length of the argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> ch - a character array.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
  </dl></dd>
</dl>
<a name="insert(int, boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> insert(int offset,
                            boolean b)
</pre>
<dl>
  <dd> Inserts the string representation of the <code>boolean</code>
 argument into this string buffer.
 <p>
 The second argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then inserted into this string buffer at the indicated
 offset.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than or equal to the length of this
 string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> b - a <code>boolean</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(boolean)">valueOf</a>, <a href="#insert(int, java.lang.String)">insert</a>, <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="insert(int, char)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> insert(int offset,
                                         char c)
</pre>
<dl>
  <dd> Inserts the string representation of the <code>char</code>
 argument into this string buffer.
 <p>
 The second argument is inserted into the contents of this string
 buffer at the position indicated by <code>offset</code>. The length
 of this string buffer increases by one.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than or equal to the length of this
 string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> ch - a <code>char</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="insert(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> insert(int offset,
                            int i)
</pre>
<dl>
  <dd> Inserts the string representation of the second <code>int</code>
 argument into this string buffer.
 <p>
 The second argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then inserted into this string buffer at the indicated
 offset.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than or equal to the length of this
 string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> b - an <code>int</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(int)">valueOf</a>, <a href="#insert(int, java.lang.String)">insert</a>, <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="insert(int, long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> insert(int offset,
                            long l)
</pre>
<dl>
  <dd> Inserts the string representation of the <code>long</code>
 argument into this string buffer.
 <p>
 The second argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then inserted into this string buffer at the indicated
 offset.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than or equal to the length of this
 string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> b - a <code>long</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(long)">valueOf</a>, <a href="#insert(int, java.lang.String)">insert</a>, <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="insert(int, float)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> insert(int offset,
                            float f)
</pre>
<dl>
  <dd> Inserts the string representation of the <code>float</code>
 argument into this string buffer.
 <p>
 The second argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then inserted into this string buffer at the indicated
 offset.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than or equal to the length of this
 string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> b - a <code>float</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(float)">valueOf</a>, <a href="#insert(int, java.lang.String)">insert</a>, <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="insert(int, double)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="insert"><b>insert</b></a>
<pre>
 public <a href="#_top_">StringBuffer</a> insert(int offset,
                            double d)
</pre>
<dl>
  <dd> Inserts the string representation of the <code>double</code>
 argument into this string buffer.
 <p>
 The second argument is converted to a string as if by the method
 <code>String.valueOf</code>, and the characters of that
 string are then inserted into this string buffer at the indicated
 offset.
 <p>
 The offset argument must be greater than or equal to
 <code>0</code>, and less than or equal to the length of this
 string buffer.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> offset - the offset.
    <dd> b - a <code>double</code>.
    <dt> <b>Returns:</b>
    <dd> this string buffer.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the offset is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.String.html#valueOf(double)">valueOf</a>, <a href="#insert(int, java.lang.String)">insert</a>, <a href="#length()">length</a>
  </dl></dd>
</dl>
<a name="reverse()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="reverse"><b>reverse</b></a>
<pre>
 public synchronized <a href="#_top_">StringBuffer</a> reverse()
</pre>
<dl>
  <dd> The character sequence contained in this string buffer is
 replaced by the reverse of the sequence.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> this string buffer.
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Converts to a string representing the data in this string buffer.
 A new <code>String</code> object is allocated and initialized to
 contain the character sequence currently represented by this
 string buffer. This <code>String</code> is then returned. Subsequent
 changes to the string buffer do not affect the contents of the
 <code>String</code>.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of the string buffer.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.lang.html">This Package</a>  <a href="java.lang.String.html#_top_">Previous</a>  <a href="java.lang.System.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
