public class WriterUTF8OutputStream
extends java.io.OutputStream
Constructor and Description |
---|
WriterUTF8OutputStream(java.io.Writer writer)
Composes an InputStream stream from any other Reader you may have around.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the wrapped OutputStream and terminates output.
|
void |
flush()
Flush.
|
void |
write(int b)
Receives a byte value, converts properly to a UTF-16 character and writes
it to the Writer.
|
public WriterUTF8OutputStream(java.io.Writer writer)
writer
- The object to write to. Must not be null
.public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
b
- the value of the next byte of the UTF-8 stream to write.java.io.IOException
- if the wrapped Writer fails to writepublic void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- if the original Writer fails to be flushedpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
- if the original Writer fails to be closed