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
ConstructorDescriptionCreates 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:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
toString
-
toStringBuilder
Returns aStringBuilder
with the contents.
-