public class OutputStreamWriter extends Writer
Constructor and Description |
---|
OutputStreamWriter(OutputStream os)
Create an OutputStreamWriter that uses the default character encoding.
|
OutputStreamWriter(OutputStream os,
String enc)
Create an OutputStreamWriter that uses the named character encoding.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the stream.
|
void |
flush()
Flush the stream.
|
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters.
|
void |
write(int c)
Write a single character.
|
void |
write(String str,
int off,
int len)
Write a portion of a string.
|
public OutputStreamWriter(OutputStream os)
public OutputStreamWriter(OutputStream os, String enc) throws UnsupportedEncodingException
UnsupportedEncodingException
public void close() throws IOException
close
in interface AutoCloseable
close
in class Writer
IOException
public void flush() throws IOException
flush
in class Writer
IOException
public void write(char[] cbuf, int off, int len) throws IOException
write
in class Writer
IOException
public void write(int c) throws IOException
write
in class Writer
IOException
public void write(String str, int off, int len) throws IOException
write
in class Writer
IOException