Package org.testng.reporters
Class FileStringBuffer
- java.lang.Object
-
- org.testng.reporters.FileStringBuffer
-
- All Implemented Interfaces:
IBuffer
public class FileStringBuffer extends java.lang.Object implements IBuffer
A string buffer that flushes its content to a temporary file whenever the internal string buffer becomes larger than MAX. If the buffer never reaches that size, no file is ever created and everything happens in memory, so the overhead compared to StringBuffer/StringBuilder is minimal.Note: calling toString() will force the entire string to be loaded in memory, use toWriter() if you need to avoid this.
This class is not multi thread safe.
- Since:
- Nov 9, 2012
-
-
Constructor Summary
Constructors Constructor Description FileStringBuffer()
FileStringBuffer(int maxCharacters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileStringBuffer
append(java.lang.CharSequence s)
java.lang.String
toString()
void
toWriter(java.io.Writer fw)
-
-
-
Method Detail
-
append
public FileStringBuffer append(java.lang.CharSequence s)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-