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.OutputStreamb - 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.Flushableflush in class java.io.OutputStreamjava.io.IOException - if the original Writer fails to be flushedpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException - if the original Writer fails to be closed