Class FileWriter

java.lang.Object
com.javaholics.FileWriter

public class FileWriter extends Object
A class that writes data to a file.
Version:
1.0
Author:
Lindsay Kislingbury
  • Constructor Details

    • FileWriter

      public FileWriter(String filename)
      Constructs a new FileWriter with the specified filename.
      Parameters:
      filename - the name of the file to write to
  • Method Details

    • clearFile

      public void clearFile()
      Clears the file specified in the constructor.
    • writeData

      public void writeData(String data)
      Writes the specified data to the file specified in the constructor. The data is appended to the end of the file.
      Parameters:
      data - the data to write to the file