Class FileFormatToken
- java.lang.Object
-
- com.barrybecker4.ca.dj.jigo.sgf.tokens.SGFToken
-
- com.barrybecker4.ca.dj.jigo.sgf.tokens.TextToken
-
- com.barrybecker4.ca.dj.jigo.sgf.tokens.NumberToken
-
- com.barrybecker4.ca.dj.jigo.sgf.tokens.FileFormatToken
-
- All Implemented Interfaces:
InfoToken
public class FileFormatToken extends NumberToken implements InfoToken
The version of SGF file. Versions 3 and 4 are supported.
-
-
Constructor Summary
Constructors Constructor Description FileFormatToken()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected floatgetDefault()Presume SGF File Format 3 by default.intgetVersion()protected booleanparseContent(java.io.StreamTokenizer st)Reads the text in between the first opening '[' and closing ']'.-
Methods inherited from class com.barrybecker4.ca.dj.jigo.sgf.tokens.NumberToken
getNumber
-
-
-
-
Method Detail
-
getDefault
protected float getDefault()
Presume SGF File Format 3 by default.- Specified by:
getDefaultin classNumberToken
-
parseContent
protected boolean parseContent(java.io.StreamTokenizer st) throws java.io.IOException, SGFExceptionDescription copied from class:TextTokenReads the text in between the first opening '[' and closing ']'. This takes into consideration carriage returns, new lines, escaping ('\'), and special punctuation.- Overrides:
parseContentin classNumberToken- Parameters:
st- - The stream which contains characters from an SGF file.- Returns:
- true - The content was parsed successfully.
- Throws:
SGFException- - Something quite nasty happened.java.io.IOException
-
getVersion
public int getVersion()
-
-