Package org.xnio.streams
Class WriterOutputStream
java.lang.Object
java.io.OutputStream
org.xnio.streams.WriterOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
An output stream which decodes bytes into a character writer.
-
Constructor Summary
ConstructorsConstructorDescriptionWriterOutputStream(Writer writer) Construct a new instance.WriterOutputStream(Writer writer, String charsetName) Construct a new instance.WriterOutputStream(Writer writer, Charset charset) Construct a new instance.WriterOutputStream(Writer writer, CharsetDecoder decoder) Construct a new instance.WriterOutputStream(Writer writer, CharsetDecoder decoder, int bufferSize) Construct a new instance. -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
WriterOutputStream
Construct a new instance.- Parameters:
writer- the writer to decode into
-
WriterOutputStream
Construct a new instance.- Parameters:
writer- the writer to decode intodecoder- the charset decoder to use
-
WriterOutputStream
Construct a new instance.- Parameters:
writer- the writer to decode intodecoder- the charset decoder to usebufferSize- the buffer size to use
-
WriterOutputStream
Construct a new instance.- Parameters:
writer- the writer to decode intocharset- the character set to use
-
WriterOutputStream
Construct a new instance.- Parameters:
writer- the writer to decode intocharsetName- the character set name to use- Throws:
UnsupportedEncodingException- if the character set name is unknown
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
toString
Get the string representation of this object.
-