net.sf.freecol.common.io
Class FreeColTcFile

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

public class FreeColTcFile
extends FreeColModFile

A Total Conversion (TC).


Field Summary
static java.lang.String DIRECTORY
           
 
Fields inherited from class net.sf.freecol.common.io.FreeColModFile
FILE_ENDINGS, MOD_DESCRIPTOR_FILE, SPECIFICATION_FILE
 
Constructor Summary
FreeColTcFile(java.io.File file)
          Opens the given file for reading.
FreeColTcFile(java.lang.String id)
          Opens the file with the given name for reading.
 
Method Summary
protected  java.lang.String[] getFileEndings()
          File endings that are supported for this type of data file.
 ResourceMapping getResourceMapping()
          Creates a ResourceMapping from the available resource files.
static java.io.File getRulesDirectory()
           
 
Methods inherited from class net.sf.freecol.common.io.FreeColModFile
getId, getParent, getSpecification, getSpecificationInputStream, readModDescriptor
 
Methods inherited from class net.sf.freecol.common.io.FreeColDataFile
getFileFilter, getFileNames, getInputStream, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRECTORY

public static final java.lang.String DIRECTORY
See Also:
Constant Field Values
Constructor Detail

FreeColTcFile

public FreeColTcFile(java.io.File file)
              throws java.io.IOException
Opens the given file for reading.

Parameters:
file - The file to load.
Throws:
java.io.IOException - if thrown while opening the file.

FreeColTcFile

public FreeColTcFile(java.lang.String id)
              throws java.io.IOException
Opens the file with the given name for reading.

Parameters:
id - The id of the TC to load.
Throws:
java.io.IOException - if thrown while opening the file.
Method Detail

getResourceMapping

public ResourceMapping getResourceMapping()
Creates a ResourceMapping from the available resource files.

Overrides:
getResourceMapping in class FreeColDataFile
Returns:
A ResourceMapping or null there is no resource mapping file.

getFileEndings

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

Overrides:
getFileEndings in class FreeColModFile
Returns:
An array of: ".ftc" and ".zip".

getRulesDirectory

public static java.io.File getRulesDirectory()