OutputStreamWriter

public class OutputStreamWriter extends Writer
Known Direct Subclasses

A class for turning a character stream into a byte stream. Data written to the target input stream is converted into bytes by either a default or a provided character converter. The default encoding is taken from the "file.encoding" system property. OutputStreamWriter contains a buffer of bytes to be written to target stream and converts these into characters as needed. The buffer size is 8K.

Inherited Field Summary

Public Constructor Summary

OutputStreamWriter(OutputStream out)
Constructs a new OutputStreamWriter using out as the target stream to write converted characters to.
OutputStreamWriter(OutputStream out, String charsetName)
Constructs a new OutputStreamWriter using out as the target stream to write converted characters to and charsetName as the character encoding.
OutputStreamWriter(OutputStream out, Charset cs)
Constructs a new OutputStreamWriter using out as the target stream to write converted characters to and cs as the character encoding.
OutputStreamWriter(OutputStream out, CharsetEncoder charsetEncoder)
Constructs a new OutputStreamWriter using out as the target stream to write converted characters to and charsetEncoder as the character encoder.

Public Method Summary

void
close()
Closes this writer.
void
flush()
Flushes this writer.
String
getEncoding()
Returns the canonical name of the encoding used by this writer to convert characters to bytes, or null if this writer has been closed.
void
write(int oneChar)
Writes the character oneChar to this writer.
void
write(String str, int offset, int count)
Writes count characters starting at offset in str to this writer.
void
write(char[] buffer, int offset, int count)
Writes count characters starting at offset in buf to this writer.

Inherited Method Summary