chesspresso.pgn
Class PGNReader
java.lang.Object
|
+--chesspresso.pgn.PGN
|
+--chesspresso.pgn.PGNReader
- public final class PGNReader
- extends PGN
Reader for PGN files.
- Version:
- $Revision: 1.1 $
- Author:
- Bernhard Seybold
Fields inherited from class chesspresso.pgn.PGN |
TAG_BLACK, TAG_BLACK_ELO, TAG_DATE, TAG_ECO, TAG_EVENT, TAG_EVENT_DATE, TAG_FEN, TAG_RESULT, TAG_ROUND, TAG_SITE, TAG_WHITE, TAG_WHITE_ELO, TOK_ASTERISK, TOK_COMMENT_BEGIN, TOK_COMMENT_END, TOK_LBRACKET, TOK_LINE_BEGIN, TOK_LINE_COMMENT, TOK_LINE_END, TOK_NAG_BEGIN, TOK_PERIOD, TOK_PGN_ESCAPE, TOK_QUOTE, TOK_RBRACKET, TOK_TAG_BEGIN, TOK_TAG_END |
Constructor Summary |
protected |
PGNReader()
|
|
PGNReader(java.io.InputStream in,
java.lang.String name)
|
|
PGNReader(java.io.Reader reader,
java.lang.String name)
Deprecated. |
|
PGNReader(java.lang.String filename)
Deprecated. |
|
PGNReader(java.net.URL url)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TOK_EOF
static final int TOK_EOF
- See Also:
- Constant Field Values
TOK_EOL
static final int TOK_EOL
- See Also:
- Constant Field Values
TOK_IDENT
static final int TOK_IDENT
- See Also:
- Constant Field Values
TOK_STRING
static final int TOK_STRING
- See Also:
- Constant Field Values
TOK_NO_TOKEN
static final int TOK_NO_TOKEN
- See Also:
- Constant Field Values
PGNReader
protected PGNReader()
PGNReader
public PGNReader(java.io.InputStream in,
java.lang.String name)
PGNReader
public PGNReader(java.lang.String filename)
throws java.io.IOException
- Deprecated.
PGNReader
public PGNReader(java.net.URL url)
throws java.net.MalformedURLException,
java.io.IOException
- Deprecated.
PGNReader
public PGNReader(java.io.Reader reader,
java.lang.String name)
- Deprecated.
isPGNFile
public static boolean isPGNFile(java.lang.String filename)
isPGNFileOrZipped
public static boolean isPGNFileOrZipped(java.lang.String filename)
getFileFilter
public static javax.swing.filechooser.FileFilter getFileFilter()
setInput
protected void setInput(java.io.Reader reader,
java.lang.String name)
setUseSemicolonComments
public void setUseSemicolonComments(boolean flag)
setErrorHandler
public void setErrorHandler(PGNErrorHandler handler)
parseGame
public Game parseGame()
throws PGNSyntaxError,
java.io.IOException
- Returns the next game in the current pgn file.
- Returns:
- the next game
PGNSyntaxError
java.io.IOException
completeGame
public void completeGame(Game game)
main
public static void main(java.lang.String[] args)