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
UnsupportedEncodingExceptionpublic void close()
throws IOException
close in interface AutoCloseableclose in class WriterIOExceptionpublic void flush()
throws IOException
flush in class WriterIOExceptionpublic void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOExceptionpublic void write(int c)
throws IOException
write in class WriterIOExceptionpublic void write(String str, int off, int len) throws IOException
write in class WriterIOException