net.sf.freecol.common.io
Class FreeColSavegameFile

java.lang.Object
  extended by net.sf.freecol.common.io.FreeColDataFile
      extended by net.sf.freecol.common.io.FreeColSavegameFile

public class FreeColSavegameFile
extends FreeColDataFile

Represents a FreeCol savegame.


Field Summary
static java.lang.String CLIENT_OPTIONS
          The name of the file that contains the ClientOptions saved with the game.
private static java.util.logging.Logger logger
           
static java.lang.String SAVEGAME_FILE
          The name of the file that contains the actual savegame.
static java.lang.String SAVEGAME_PROPERTIES
          The name of a properties file that contains information about the saved game, such as the size of the map, the date and time it was started, and so on.
static java.lang.String THUMBNAIL_FILE
          The name of the image file that contains the map thumbnail, i.e.
 
Constructor Summary
FreeColSavegameFile(java.io.File file)
           
 
Method Summary
protected  java.lang.String[] getFileEndings()
          File endings that are supported for this type of data file.
 java.io.BufferedInputStream getSavegameInputStream()
          Gets the input stream to the savegame data.
 
Methods inherited from class net.sf.freecol.common.io.FreeColDataFile
getFileFilter, getFileNames, getInputStream, getResourceMapping, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final java.util.logging.Logger logger

SAVEGAME_FILE

public static final java.lang.String SAVEGAME_FILE
The name of the file that contains the actual savegame.

See Also:
Constant Field Values

SAVEGAME_PROPERTIES

public static final java.lang.String SAVEGAME_PROPERTIES
The name of a properties file that contains information about the saved game, such as the size of the map, the date and time it was started, and so on. The map size is used in the MapGeneratorOptionsDialog, for example.

See Also:
Constant Field Values

CLIENT_OPTIONS

public static final java.lang.String CLIENT_OPTIONS
The name of the file that contains the ClientOptions saved with the game.

See Also:
Constant Field Values

THUMBNAIL_FILE

public static final java.lang.String THUMBNAIL_FILE
The name of the image file that contains the map thumbnail, i.e. a view of the game map as seen by the owner of the game when saving. The thumbnail image is used by the MapGeneratorOptionsDialog, in particular.

See Also:
Constant Field Values
Constructor Detail

FreeColSavegameFile

public FreeColSavegameFile(java.io.File file)
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getSavegameInputStream

public java.io.BufferedInputStream getSavegameInputStream()
                                                   throws java.io.IOException
Gets the input stream to the savegame data.

Returns:
An InputStream to the file "savegame.xml" within this data file.
Throws:
java.io.IOException - if thrown while opening the input stream.

getFileEndings

protected java.lang.String[] getFileEndings()
File endings that are supported for this type of data file.

Overrides:
getFileEndings in class FreeColDataFile
Returns:
An array of: ".fsg" and ".zip".