public final class UTF8OutputStreamWriter extends Writer
This class is used to write a stream of chars as a stream of bytes using the UTF8 encoding. It assumes that the underlying output stream is buffered or does not need additional buffering.
It is more efficient than using a java.io.OutputStreamWriter
because it does not need to be wrapped in a
java.io.BufferedWriter. Creating multiple instances
of java.io.BufferedWriter has been shown to be very
expensive in JAX-WS.
| Constructor and Description |
|---|
UTF8OutputStreamWriter(OutputStream out) |
public UTF8OutputStreamWriter(OutputStream out)
public String getEncoding()
public void write(int c)
throws IOException
write in class WriterIOExceptionpublic void write(char[] cbuf)
throws IOException
write in class WriterIOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionpublic void write(String str) throws IOException
write in class WriterIOExceptionpublic void write(String str, int off, int len) throws IOException
write in class WriterIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterIOExceptionCopyright © 2018–2021 mhoffrogge. All rights reserved.