edu.pdx.cs399J.security
Class GameConsolePriv

java.lang.Object
  extended by edu.pdx.cs399J.security.GameConsole
      extended by edu.pdx.cs399J.security.GameConsolePriv

public class GameConsolePriv
extends GameConsole

This class represents a game console that can play many games.


Constructor Summary
GameConsolePriv()
           
 
Method Summary
static void main(String[] args)
          The command line contains the name of the game and a URL from where to load it.
 String readPreferences(Game game)
          Called from the Game to read a game's preferences file.
 boolean writePreferences(Game game, String prefs)
          Note use of doPrivileged.
 
Methods inherited from class edu.pdx.cs399J.security.GameConsole
loadGame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameConsolePriv

public GameConsolePriv()
Method Detail

writePreferences

public boolean writePreferences(Game game,
                                String prefs)
Note use of doPrivileged. This says that we trust this code.

Overrides:
writePreferences in class GameConsole
Returns:
true if the preferences were sucessfully written (note that we don't want the name of the preferences file escaping!)

readPreferences

public String readPreferences(Game game)
Description copied from class: GameConsole
Called from the Game to read a game's preferences file.

Overrides:
readPreferences in class GameConsole
Returns:
null if the preferences could not be read

main

public static void main(String[] args)
The command line contains the name of the game and a URL from where to load it.



Copyright © 2000-2009 Portland State University. All Rights Reserved.