Class 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 float getDefault()
      Presume SGF File Format 3 by default.
      int getVersion()  
      protected boolean parseContent​(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.TextToken

        getText
      • Methods inherited from class com.barrybecker4.ca.dj.jigo.sgf.tokens.SGFToken

        parse
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileFormatToken

        public FileFormatToken()
    • Method Detail

      • getDefault

        protected float getDefault()
        Presume SGF File Format 3 by default.
        Specified by:
        getDefault in class NumberToken
      • parseContent

        protected boolean parseContent​(java.io.StreamTokenizer st)
                                throws java.io.IOException,
                                       SGFException
        Description copied from class: TextToken
        Reads the text in between the first opening '[' and closing ']'. This takes into consideration carriage returns, new lines, escaping ('\'), and special punctuation.
        Overrides:
        parseContent in class NumberToken
        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()