Class FileUtils

java.lang.Object
FileUtils

public class FileUtils extends Object
File Utilities for reading and writing
Since:
August 20, 2026
  • Constructor Details

    • FileUtils

      public FileUtils()
  • Method Details

    • openToRead

      public static Scanner openToRead(String fileName)
      Opens a file to read using the Scanner class
      Parameters:
      fileName - name of the file to open
      Returns:
      the Scanner object to the file
    • openToWrite

      public static PrintWriter openToWrite(String fileName)
      Opens a file to write using the PrintWriter class
      Parameters:
      fileName - name of the file to open
      Returns:
      the PrintWriter object to the file