Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Java FileWriter Class

Java FileWriter Class

Java Stream Java Stream


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: