Package edu.pdx.cs410J.security
Class GameConsolePriv
java.lang.Object
edu.pdx.cs410J.security.GameConsole
edu.pdx.cs410J.security.GameConsolePriv
This class represents a game console that can play many games.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidThe command line contains the name of the game and a URL from where to load it.readPreferences(Game game) Called from the Game to read a game's preferences file.booleanwritePreferences(Game game, String prefs) Note use of doPrivileged.Methods inherited from class edu.pdx.cs410J.security.GameConsole
loadGame
-
Constructor Details
-
GameConsolePriv
public GameConsolePriv()
-
-
Method Details
-
writePreferences
Note use of doPrivileged. This says that we trust this code.- Overrides:
writePreferencesin classGameConsole- Returns:
trueif the preferences were sucessfully written (note that we don't want the name of the preferences file escaping!)
-
readPreferences
Description copied from class:GameConsoleCalled from the Game to read a game's preferences file.- Overrides:
readPreferencesin classGameConsole- Returns:
nullif the preferences could not be read
-
main
The command line contains the name of the game and a URL from where to load it.
-