java.io
public class BufferedWriter extends Writer
UNKNOWN: September 25, 1998
Constructor Summary | |
---|---|
BufferedWriter(Writer out)
This method initializes a new BufferedWriter instance
that will write to the specified subordinate Writer
and which will use a default buffer size of 8192 chars.
| |
BufferedWriter(Writer out, int size)
This method initializes a new BufferedWriter instance
that will write to the specified subordinate Writer
and which will use the specified buffer size
|
Method Summary | |
---|---|
void | close()
This method flushes any remaining buffered chars then closes the
underlying output stream. |
void | flush()
This method causes any currently buffered chars to be immediately
written to the underlying output stream.
|
void | newLine()
This method writes out a system depedent line separator sequence. |
void | write(int oneChar)
This method writes a single char of data. |
void | write(char[] buf, int offset, int len)
This method writes len chars from the char array
buf starting at position offset in the buffer.
|
void | write(String str, int offset, int len)
This method writes len chars from the String
str starting at position offset in the string.
|
BufferedWriter
instance
that will write to the specified subordinate Writer
and which will use a default buffer size of 8192 chars.
Parameters: out The underlying Writer
to write data to
BufferedWriter
instance
that will write to the specified subordinate Writer
and which will use the specified buffer size
Parameters: out The underlying Writer
to write data to size The size of the internal buffer
Throws: IOException If an error occurs.
Throws: IOException If an error occurs
Throws: IOException If an error occurs
Parameters: oneChar The char of data to be written, passed as an int
Throws: IOException If an error occurs
len
chars from the char array
buf
starting at position offset
in the buffer.
These chars will be written to the internal buffer. However, if this
write operation fills the buffer, the buffer will be flushed to the
underlying output stream.
Parameters: buf The array of chars to write. offset The index into the char array to start writing from. len The number of chars to write.
Throws: IOException If an error occurs
len
chars from the String
str
starting at position offset
in the string.
These chars will be written to the internal buffer. However, if this
write operation fills the buffer, the buffer will be flushed to the
underlying output stream.
Parameters: str The String
to write. offset The index into the string to start writing from. len The number of chars to write.
Throws: IOException If an error occurs