Package com.group21.jobTracker.csv
Class Csv
- java.lang.Object
-
- com.group21.jobTracker.csv.Csv
-
public class Csv extends Object
Class that represents the backend for JobTracker. All data is stored in the CSV files. Each user gets their own CSV file.
-
-
Constructor Summary
Constructors Constructor Description Csv()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UserloadUser(String username)Loads a specified user from a filestatic voidsaveUser(User user)Saves the given user as a string to the related csv file
-
-
-
Method Detail
-
saveUser
public static void saveUser(User user)
Saves the given user as a string to the related csv file- Parameters:
user- the user being saved
-
loadUser
public static User loadUser(String username) throws NumberFormatException, ParseException
Loads a specified user from a file- Parameters:
username- the username of the specified user- Returns:
- the user as a User object
- Throws:
ParseException- when the CSV file cannot be loadedNumberFormatException- when the CSV file cannot be loaded
-
-