vooga.users.user
Class VoogaUserSerializer

java.lang.Object
  extended by vooga.users.user.VoogaUserSerializer

public class VoogaUserSerializer
extends java.lang.Object

Serializer for VoogaUser objects. Responsible for writing them out to a file and reading them back in.

Author:
Alex Edelsburg

Constructor Summary
VoogaUserSerializer()
           
 
Method Summary
static VoogaUser loadData(java.lang.String username)
          Used to read in a VoogaUser that has been saved to a file
static void saveData(VoogaUser userToBeSaved)
          Saves a given VoogaUser to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VoogaUserSerializer

public VoogaUserSerializer()
Method Detail

saveData

public static void saveData(VoogaUser userToBeSaved)
Saves a given VoogaUser to a file

Parameters:
userToBeSaved - the user to be saved

loadData

public static VoogaUser loadData(java.lang.String username)
Used to read in a VoogaUser that has been saved to a file

Parameters:
username - the name of the VoogaUser we wish to read in
Returns:
the VoogaUser object that corresponds to this username