Package org.opentestfactory.utils
Class AmnesicStringBuffer
java.lang.Object
org.opentestfactory.utils.AmnesicStringBuffer
- All Implemented Interfaces:
Appendable
That class will eat characters and string, but will only remember the nth last character when
asked to restitute the said string. It is purely intended for saving memory, although it will not
prevent some garbage collection.
- Author:
- bsiri
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char arg0) append(CharSequence arg0) append(CharSequence arg0, int arg1, int arg2) voidsetMaxSize(int maxSize) toString()
-
Constructor Details
-
AmnesicStringBuffer
public AmnesicStringBuffer() -
AmnesicStringBuffer
public AmnesicStringBuffer(int maxSize)
-
-
Method Details
-
setMaxSize
public void setMaxSize(int maxSize) -
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable
-
toString
-