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:
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
-
toString
Get the string representation of this object.
-