Package org.jline.utils
Class WriterOutputStream
java.lang.Object
java.io.OutputStream
org.jline.utils.WriterOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Redirects an
OutputStream
to a Writer
by decoding the data
using the specified Charset
.
Note: This class should only be used if it is necessary to
redirect an OutputStream
to a Writer
for compatibility
purposes. It is much more efficient to write to the Writer
directly.
-
Constructor Summary
ConstructorsConstructorDescriptionWriterOutputStream
(Writer out, Charset charset) WriterOutputStream
(Writer out, CharsetDecoder decoder) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
WriterOutputStream
-
WriterOutputStream
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-