Java BufferedWriter Methods
BufferedWriter Methods
The BufferedWriter
class provides methods to write text efficiently:
Method | Description | Return Type |
---|---|---|
close() | Closes the stream, flushing it first | void |
flush() | Forces any buffered output to be written immediately | void |
newLine() | Writes the system's line separator | void |
write(int c) write(char[] cbuf) write(char[] cbuf, int off, int len) write(String s) write(String s, int off, int len) |
Writes a single character, an array, a portion of an array, a string, or part of a string | void |
append(char c) append(CharSequence csq) append(CharSequence csq, int start, int end) |
Appends characters or character sequences to the writer | Writer |