Package org.shredzone.commons.text.utils
Class FastStringWriter
java.lang.Object
java.io.Writer
org.shredzone.commons.text.utils.FastStringWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
A fast String writer that does not synchronize.
- Author:
- Richard "Shred" Körber
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newFastStringWriter.FastStringWriter(int capacity)Creates a newFastStringWriter. -
Method Summary
-
Constructor Details
-
FastStringWriter
public FastStringWriter()Creates a newFastStringWriter. -
FastStringWriter
Creates a newFastStringWriter.- Parameters:
capacity- Initial capacity of the collector
-
-
Method Details
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
toString
-
toStringBuilder
Returns aStringBuilderwith the contents.
-