All of the text-oriented classes are derived from Reader and Writer. By understanding them, you'll have a handle on dealing with their descendents.
The Writer class writes character data to a stream. It has the following methods:
write(c)— writes a single character to the text stream
write(cbuf)— writes a sequence of characters to the text stream
write(cbuf, off, len)— writes a sequence of characters to the text stream starting at the offset into the stream and copying to len in the buffer
write(str)— writes out a string to the text stream
write(str, off, len)— writes out a string from the given offset to the given length
close()— closes the text stream
flush()— flushes the content of the text stream; used if the stream supports ...