java.lang.Object | +--java.io.Writer | +--java.io.OutputStreamWriter
Untamed:
OutputStreamWriter(OutputStream out)
OutputStreamWriter(OutputStream out,
java.nio.charset.Charset cs)
OutputStreamWriter(OutputStream out,
java.nio.charset.CharsetEncoder enc)
OutputStreamWriter(OutputStream out,
String charsetName)
(package private) void
flushBuffer()
private final sun.nio.cs.StreamEncoder se
public OutputStreamWriter(OutputStream out, String charsetName) throws UnsupportedEncodingException
out - An OutputStreamcharsetName - The name of a supported
charsetpublic OutputStreamWriter(OutputStream out)
out - An OutputStreampublic OutputStreamWriter(OutputStream out, java.nio.charset.Charset cs)
out - An OutputStreampublic OutputStreamWriter(OutputStream out, java.nio.charset.CharsetEncoder enc)
out - An OutputStreamenc - A charset encoderpublic String getEncoding()
If the encoding has an historical name then that name is returned; otherwise the encoding's canonical name is returned.
If this instance was created with the OutputStreamWriter(OutputStream, String) constructor then the returned
name, being unique for the encoding, may differ from the name passed to
the constructor. This method may return null if the stream has
been closed.
null if the stream has been closedjava.nio.charset.Charsetvoid flushBuffer() throws IOException
public void write(int c) throws IOException
c - int specifying a character to be written.
IOExceptionpublic void write(char[] cbuf, int off, int len) throws IOException
cbuf - Buffer of charactersoff - Offset from which to start writing characterslen - Number of characters to write
IOExceptionpublic void write(String str, int off, int len) throws IOException
str - A Stringoff - Offset from which to start writing characterslen - Number of characters to write
IOExceptionpublic void flush() throws IOException
public void close() throws IOException