StringBuffer Members

StringBuffer Members

Class Overview | This Package | All Packages

Constructors
Name Description
StringBuffer() Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
StringBuffer(int) Constructs a string buffer with no characters in it and an initial capacity specified by the length argument.
StringBuffer(String) Constructs a string buffer so that it represents the same sequence of characters as the string argument.

Methods
Name Description
append(boolean) Appends the string representation of the boolean argument to the string buffer.
append(char) Appends the string representation of the char argument to this string buffer.
append(char[]) Appends the string representation of the char array argument to this string buffer.
append(char[], int, int) Appends the string representation of a subarray of the char array argument to this string buffer.
append(double) Appends the string representation of the double argument to this string buffer.
append(float) Appends the string representation of the float argument to this string buffer.
append(int) Appends the string representation of the int argument to this string buffer.
append(long) Appends the string representation of the long argument to this string buffer.
append(Object) Appends the string representation of the Object argument to this string buffer.
append(String) Appends the string to this string buffer.
capacity() Returns the current capacity of the String buffer.
charAt(int) Returns the character at a specific index in this string buffer.
ensureCapacity(int) Ensures that the capacity of the buffer is at least equal to the specified minimum.
getChars(int, int, char[], int) Characters are copied from this string buffer into the destination character array dst.
insert(int, boolean) Inserts the string representation of the boolean argument into this string buffer.
insert(int, char) Inserts the string representation of the char argument into this string buffer.
insert(int, char[]) Inserts the string representation of the char array argument into this string buffer.
insert(int, double) Inserts the string representation of the double argument into this string buffer.
insert(int, float) Inserts the string representation of the float argument into this string buffer.
insert(int, int) Inserts the string representation of the second int argument into this string buffer.
insert(int, long) Inserts the string representation of the long argument into this string buffer.
insert(int, Object) Inserts the string representation of the Object argument into this string buffer.
insert(int, String) Inserts the string into this string buffer.
length() Returns the length (character count) of this string buffer.
reverse() The character sequence contained in this string buffer is replaced by the reverse of the sequence.
setCharAt(int, char) The character at the specified index of this string buffer is set to ch.
setLength(int) Sets the length of this String buffer.
toString() Converts to a string representing the data in this string buffer.