Java FileWriter Methods
FileWriter Methods
The FileWriter class writes characters to a file (text I/O):
| Method | Description | Return Type |
|---|---|---|
| write() | Writes a single character, an array (or part of it), a string, or a substring | void |
| append() | Appends a character or character sequence (supports chaining) | Writer |
| flush() | Forces any buffered characters to be written immediately | void |
| close() | Closes the stream and releases system resources | void |
| getEncoding() | Returns the name of the character encoding (may be null if unknown) | String |