Class ChaosGameFileHandler
java.lang.Object
edu.ntnu.stud.chaosgame.controller.utility.ChaosGameFileHandler
Class for handling the reading and writing of chaos game files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreadFromFile
(String path) Creates a ChaosGameDescription based on the file found at the input path.void
writeToFile
(ChaosGameDescription description, String path) Reads from a file.
-
Constructor Details
-
ChaosGameFileHandler
public ChaosGameFileHandler()
-
-
Method Details
-
readFromFile
Creates a ChaosGameDescription based on the file found at the input path.- Parameters:
path
- A String input which gives the path to a file describing a chaos game.- Returns:
- A
ChaosGameDescription
description of a chaos game.
-
writeToFile
Reads from a file.- Parameters:
description
- AChaosGameDescription
description of the chaos game that should be written to file.path
- A String describing the path to the file that should be written to.- Throws:
IOException
- if the file cannot be written to.
-