java.io
Class OutputStreamWriter
java.lang.Object
java.io.Writer
java.io.OutputStreamWriter
public class OutputStreamWriter
- extends Writer
|
Method Summary |
void |
close()
Close this Writer. |
void |
flush()
Flush this Writer. |
void |
write(char[] cbuf,
int off,
int len)
Writes count characters starting at offset in
buf to this Writer. |
OutputStreamWriter
public OutputStreamWriter(OutputStream out)
OutputStreamWriter
public OutputStreamWriter(OutputStream out,
String charsetName)
write
public void write(char[] cbuf,
int off,
int len)
throws IOException
- Description copied from class:
Writer
- Writes
count characters starting at offset in
buf to this Writer. This abstract method must be implemented
by concrete subclasses.
- Specified by:
write in class Writer
- Parameters:
cbuf - the non-null array containing characters to write.off - offset in buf to retrieve characterslen - maximum number of characters to write
- Throws:
IOException - If this Writer has already been closed or some other IOException occurs.
flush
public void flush()
throws IOException
- Description copied from class:
Writer
- Flush this Writer. This must be implemented by any concrete subclasses.
The implementation should ensure all buffered characters are written out.
- Specified by:
flush in class Writer
- Throws:
IOException - If an error occurs attempting to flush this Writer.
close
public void close()
throws IOException
- Description copied from class:
Writer
- Close this Writer. This must be implemented by any concrete subclasses.
The implementation should free any resources associated with the Writer.
- Specified by:
close in class Writer
- Throws:
IOException - If an error occurs attempting to close this Writer.