Class FileHandleUtil
java.lang.Object
FileHandleUtil
-
Method Summary
Modifier and TypeMethodDescriptionvoidadds a score, reorganizes the rank ids and writes to filevoidbooleandelete savefilestatic FileHandleUtilreads all scores from filereads all scores from file
-
Method Details
-
getInstance
-
readScores
reads all scores from file- Returns:
- scores sorted by rank
- Throws:
IOException
-
readLatestScores
reads all scores from file- Returns:
- scores sorted by datetime
- Throws:
IOException
-
addScore
adds a score, reorganizes the rank ids and writes to file- Parameters:
score-- Throws:
IOException
-
deleteFile
public boolean deleteFile()delete savefile- Returns:
- boolean if file deleted
-
createFile
- Throws:
IOException
-