java.lang.Object
java.io.Writer
io.github.ascopes.jct.diagnostics.TeeWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
A writer that wraps an output stream and also writes any content to an in-memory buffer.
This is thread-safe.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Constructor Details
-
TeeWriter
Initialise the writer.- Parameters:
writer- the underlying writer to "tee" to.
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
toString
-
write
- Specified by:
writein classWriter- Throws:
IOException
-