Package org.testng.reporters
Class FileStringBuffer
java.lang.Object
org.testng.reporters.FileStringBuffer
- All Implemented Interfaces:
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Logger
private File
private final int
private StringBuilder
private static int
private static final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
private void
private static void
toString()
void
-
Field Details
-
MAX
private static int MAX -
VERBOSE
private static final boolean VERBOSE -
LOGGER
-
m_file
-
m_sb
-
m_maxCharacters
private final int m_maxCharacters
-
-
Constructor Details
-
FileStringBuffer
public FileStringBuffer() -
FileStringBuffer
public FileStringBuffer(int maxCharacters)
-
-
Method Details