All Packages Class Hierarchy This Package Previous Next Index
Class EDU.bmrb.starlibj.HomemadeStringBuffer
java.lang.Object
|
+----EDU.bmrb.starlibj.HomemadeStringBuffer
- public class HomemadeStringBuffer
- extends Object
I made this as a stopgap measure to behave much like the
standard type: java.lang.StringBuffer. I needed
a drop-in replacement for StringBuffer.because the one
that came with the Blackdown JDK for Linux is broken. It
eats ten times as much memory as needed when you append to
it slowly in a loop while doing other things (it is hard
to recreate).
-
HomemadeStringBuffer()
-
-
HomemadeStringBuffer(String)
-
-
append(char)
- Append a char to this string buffer.
-
append(char[])
- Append a char array to this string buffer.
-
append(String)
- Append a string to this string buffer.
-
capacity()
- Get the total size the array buffer is using (This is
how big the array can grow before the next time it will
need to automatically relocate itself into a bigger array).
-
charAt(int)
- Functions identically to the StringBuffer function of the
same name.
-
getBuf()
- Get the character array buffer that holds this string
-
getChars(int, int, char[], int)
- Functions identically to the StringBuffer function of the
same name.
-
length()
- Get the useful length of the array buffer
HomemadeStringBuffer
public HomemadeStringBuffer()
HomemadeStringBuffer
public HomemadeStringBuffer(String copyMe)
getBuf
public char[] getBuf()
- Get the character array buffer that holds this string
length
public int length()
- Get the useful length of the array buffer
capacity
public int capacity()
- Get the total size the array buffer is using (This is
how big the array can grow before the next time it will
need to automatically relocate itself into a bigger array).
charAt
public char charAt(int idx)
- Functions identically to the StringBuffer function of the
same name.
getChars
public void getChars(int srcBegin,
int srcEnd,
char dst[],
int dstBegin)
- Functions identically to the StringBuffer function of the
same name.
append
public void append(String appendMe)
- Append a string to this string buffer.
append
public void append(char appendMe[])
- Append a char array to this string buffer.
append
public void append(char appendMe)
- Append a char to this string buffer.
All Packages Class Hierarchy This Package Previous Next Index