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).


Constructor Index

 o HomemadeStringBuffer()
 o HomemadeStringBuffer(String)

Method Index

 o append(char)
Append a char to this string buffer.
 o append(char[])
Append a char array to this string buffer.
 o append(String)
Append a string to this string buffer.
 o 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).
 o charAt(int)
Functions identically to the StringBuffer function of the same name.
 o getBuf()
Get the character array buffer that holds this string
 o getChars(int, int, char[], int)
Functions identically to the StringBuffer function of the same name.
 o length()
Get the useful length of the array buffer

Constructors

 o HomemadeStringBuffer
 public HomemadeStringBuffer()
 o HomemadeStringBuffer
 public HomemadeStringBuffer(String copyMe)

Methods

 o getBuf
 public char[] getBuf()
Get the character array buffer that holds this string

 o length
 public int length()
Get the useful length of the array buffer

 o 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).

 o charAt
 public char charAt(int idx)
Functions identically to the StringBuffer function of the same name.

 o getChars
 public void getChars(int srcBegin,
                      int srcEnd,
                      char dst[],
                      int dstBegin)
Functions identically to the StringBuffer function of the same name.

 o append
 public void append(String appendMe)
Append a string to this string buffer.

 o append
 public void append(char appendMe[])
Append a char array to this string buffer.

 o append
 public void append(char appendMe)
Append a char to this string buffer.


All Packages  Class Hierarchy  This Package  Previous  Next  Index