Package com.aspectran.utils
Class OutputStringWriter
java.lang.Object
java.io.Writer
com.aspectran.utils.OutputStringWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
A character stream that collects its output in a string builder,
which can then be used to construct a string.
Closing a StringWriter has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new string writer using the default initial string-builder size.OutputStringWriter
(int initialSize) Create a new string writer using the specified initial string-builder size. -
Method Summary
Methods inherited from class java.io.Writer
nullWriter, write
-
Constructor Details
-
OutputStringWriter
public OutputStringWriter()Create a new string writer using the default initial string-builder size. -
OutputStringWriter
public OutputStringWriter(int initialSize) Create a new string writer using the specified initial string-builder size.- Parameters:
initialSize
- the number of char values that will fit into this buffer before it is automatically expanded
-
-
Method Details
-
write
public void write(int c) -
write
-
write
-
write
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
append
- Specified by:
append
in interfaceAppendable
- Overrides:
append
in classWriter
-
toString
-
flush
public void flush() -
close
public void close() -
isDirty
public boolean isDirty()
-