|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.bmrb.starlibj.HomemadeStringBuffer
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).
Constructor Summary | |
HomemadeStringBuffer()
|
|
HomemadeStringBuffer(java.lang.String copyMe)
|
Method Summary | |
void |
append(char appendMe)
Append a char to this string buffer. |
void |
append(char[] appendMe)
Append a char array to this string buffer. |
void |
append(java.lang.String appendMe)
Append a string to this string buffer. |
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). |
char |
charAt(int idx)
Functions identically to the StringBuffer function of the same name. |
char[] |
getBuf()
Get the character array buffer that holds this string |
void |
getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
Functions identically to the StringBuffer function of the same name. |
int |
length()
Get the useful length of the array buffer |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public HomemadeStringBuffer()
public HomemadeStringBuffer(java.lang.String copyMe)
Method Detail |
public char[] getBuf()
public int length()
public int capacity()
public char charAt(int idx)
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
public void append(java.lang.String appendMe)
public void append(char[] appendMe)
public void append(char appendMe)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |