|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.StringBuffer
public class StringBuffer
Class representing a mutable character string.
Constructor Summary | |
---|---|
StringBuffer()
Constructs an empty StringBuffer and allocates a default length initial buffer. |
|
StringBuffer(int length)
Constructs an empty StringBuffer and allocates an initial buffer of the length specified. |
|
StringBuffer(String string)
Constructs a StringBuffer containing the characters in the specified String. |
Method Summary | |
---|---|
StringBuffer |
append(boolean b)
Appends "true" or "false" to this StringBuffer based on the boolean value specified. |
StringBuffer |
append(char value)
Appends the specified character to this StringBuffer. |
StringBuffer |
append(char[] chars)
Appends the characters from the specified array to this StringBuffer. |
StringBuffer |
append(char[] chars,
int offset,
int count)
Appends the characters from the specified array to this StringBuffer. |
StringBuffer |
append(double value)
Appends a string representation of the specified value to this StringBuffer. |
StringBuffer |
append(float f)
Appends a string represetation of the specified value to this StringBuffer. |
StringBuffer |
append(int value)
Appends a string represetation of the specified value to this StringBuffer. |
StringBuffer |
append(long value)
Appends a string represetation of the specified value to this StringBuffer. |
StringBuffer |
append(Object object)
Appends the String representation of the specified object to this StringBuffer. |
StringBuffer |
append(String string)
Appends the characters from the specified String to this StringBuffer. |
void |
ensureCapacity(int minimumLength)
Ensures the buffer is large enough to hold the minimum length specified. |
int |
length()
Returns the current length of the string. |
void |
setLength(int newLength)
Sets the length of the string. |
String |
toString()
Returns a String containing the character sequence in this StringBuffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait |
Constructor Detail |
---|
public StringBuffer()
public StringBuffer(int length)
length
- size of buffer to allocatepublic StringBuffer(String string)
string
- String to initialize the buffer fromMethod Detail |
---|
public StringBuffer append(boolean b)
b
- boolean value to append
public StringBuffer append(char value)
value
- character to append
public StringBuffer append(char[] chars)
chars
- character array
public StringBuffer append(char[] chars, int offset, int count)
chars
- character arrayoffset
- starting offset in arraycount
- characters to take from array
public StringBuffer append(double value)
value
- value whose string representation is to be appended
public StringBuffer append(float f)
f
- value whose string representation is to be appended
public StringBuffer append(int value)
value
- value whose string representation is to be appended
public StringBuffer append(long value)
value
- value whose string representation is to be appended
public StringBuffer append(Object object)
object
- object whose string representation is to be appended
public StringBuffer append(String string)
string
- string to append
public void ensureCapacity(int minimumLength)
minimumLength
- minimum size bufferpublic int length()
public void setLength(int newLength)
newLength
- new length
IndexOutOfBoundsException
- if newLength < 0public String toString()
toString
in class Object
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |