java.lang.Object
java.io.Writer
org.bzdev.io.AppendableWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
Writer that writes to an Appendable.
This class allows a Writer to be used to add text to an Appendable.
For example
new PrintWriter(new AppendableWriter(appendable)
creates a PrintWriter that can write formatted text to
appendable (whose class is, of course,
Appendable).
The implementation is thread-safe.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AppendableWriter
Consructor.- Parameters:
appendable- the appendable to write to
-
-
Method Details
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
write
- Specified by:
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
-