Name
java.io.OutputStreamWriter
Synopsis
This class is a slightly modified version of the
OutputStreamReader
class used in J2SE. The class
outputs data from a character input stream, based on a specific
encoding, to a byte input stream. The write()
methods output a single character, an array (or sub-array) of
characters, or a string (or sub-string) to the output stream. Other
methods include flush()
, which flushes the output
buffer, and close()
, which closes the output
stream and releases any resources associated with it.
public classOutputStreamWriter
extends java.io.Writer { // constructors publicOutputStreamWriter
(OutputStream os); publicOutputStreamWriter
(OutputStream os, String enc) throws java.io.UnsupportedEncodingException; // public instance methods public voidwrite
(int c) throws java.io.IOException; public voidwrite
(char[] cbuf, int off, int len) throws java.io.IOException; public voidwrite
(String str, int off, int len) throws java.io.IOException; public voidflush
() throws java.io.IOException; public voidclose
() throws java.io.IOException; }
Get Wireless Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.