/** * This function writes the generated relative overview to a file. * * @param f The file to write to. * @throws IOException Thrown if unable to open or write to the file. * @throws InsufficientDataException Thrown if unable to generate the overview. */ public void writeToFile(File f) throws IOException, InsufficientDataException { f.createNewFile(); FileWriter fw = new FileWriter(f); fw.write(generateOverviewText()); fw.close(); }