es.ucm.fdi.hysteria.game.parser
Class PeekFile
java.lang.Object
es.ucm.fdi.hysteria.game.parser.PeekFile
public class PeekFile
- extends java.lang.Object
PeekFile determines if a given file is a Game Definition, and if it's in TXT format, XML format or SAV.
It also provides with constants to use in other classes to determine the file contents.
- Author:
- MiniSandor
Constructor Summary |
PeekFile(java.lang.String gameDefinitionPath)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
IS_TXT
public static final int IS_TXT
- See Also:
- Constant Field Values
IS_XML
public static final int IS_XML
- See Also:
- Constant Field Values
IS_SAV
public static final int IS_SAV
- See Also:
- Constant Field Values
PeekFile
public PeekFile(java.lang.String gameDefinitionPath)
- Parameters:
gameDefinitionPath
- The path to the game to peek
getDirectoryPath
public java.lang.String getDirectoryPath()
- Returns:
- The path of the directory that contains this file.
getType
public int getType()
- Returns:
- The type of the file.
isTxt
public boolean isTxt()
- Returns:
- True if it's a TXT file
isXML
public boolean isXML()
- Returns:
- True if it's a XML file
isSav
public boolean isSav()
- Returns:
- True if it's a SAV file