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
private static java.util.logging.Logger logger
           
static java.lang.String SAVEGAME_FILE
           
 
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.InputStream getSavegameInputStream()
          Gets the input stream to the savegame data.
 
Methods inherited from class net.sf.freecol.common.io.FreeColDataFile
getFileFilter, 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
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.InputStream 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".