public class FileStringBuffer extends java.lang.Object implements IBuffer
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.
Modifier and Type | Field and Description |
---|---|
private static Logger |
LOGGER |
private java.io.File |
m_file |
private int |
m_maxCharacters |
private java.lang.StringBuilder |
m_sb |
private static int |
MAX |
private static boolean |
VERBOSE |
Constructor and Description |
---|
FileStringBuffer() |
FileStringBuffer(int maxCharacters) |
Modifier and Type | Method and Description |
---|---|
FileStringBuffer |
append(java.lang.CharSequence s) |
private static void |
copy(java.io.Reader input,
java.io.Writer output) |
private void |
flushToFile() |
private static void |
p(java.lang.String s) |
java.lang.String |
toString() |
void |
toWriter(java.io.Writer fw) |
private static int MAX
private static final boolean VERBOSE
private static final Logger LOGGER
private java.io.File m_file
private java.lang.StringBuilder m_sb
private final int m_maxCharacters
public FileStringBuffer()
public FileStringBuffer(int maxCharacters)
public FileStringBuffer append(java.lang.CharSequence s)
private static void copy(java.io.Reader input, java.io.Writer output) throws java.io.IOException
java.io.IOException
private void flushToFile()
private static void p(java.lang.String s)
public java.lang.String toString()
toString
in class java.lang.Object