Java FileWriter Class
The FileWriter class inherits from the OutputStreamWriter class. This class writes data to a stream character by character. You can create the needed object using the following constructors.
Constructs a FileWriter object given a File object.
FileWriter(File file)
Constructs a FileWriter object given a File object.
FileWriter(File file, boolean append)
Parameters:
- file: the File object to write data to.
- append: if the append parameter is true, bytes are written to the end of the file (appending). If the append parameter is false, they are written at the beginning of the file.
Java Stream