Class StreamTokenizerUtils

java.lang.Object
weka.core.converters.StreamTokenizerUtils
All Implemented Interfaces:
Serializable, RevisionHandler

public class StreamTokenizerUtils extends Object implements Serializable, RevisionHandler
Helper class for using stream tokenizers
Version:
$Revision: 9284 $
Author:
Mark Hall (mhall{[at]}pentaho{[dot]}com)
See Also:
  • Constructor Details

    • StreamTokenizerUtils

      public StreamTokenizerUtils()
  • Method Details

    • getRevision

      public String getRevision()
      Description copied from interface: RevisionHandler
      Returns the revision string.
      Specified by:
      getRevision in interface RevisionHandler
      Returns:
      the revision
    • getFirstToken

      public static void getFirstToken(StreamTokenizer tokenizer) throws IOException
      Gets token, skipping empty lines.
      Parameters:
      tokenizer - the stream tokenizer
      Throws:
      IOException - if reading the next token fails
    • getToken

      public static void getToken(StreamTokenizer tokenizer) throws IOException
      Gets token.
      Parameters:
      tokenizer - the stream tokenizer
      Throws:
      IOException - if reading the next token fails
    • errms

      public static void errms(StreamTokenizer tokenizer, String theMsg) throws IOException
      Throws error message with line number and last token read.
      Parameters:
      theMsg - the error message to be thrown
      tokenizer - the stream tokenizer
      Throws:
      IOException - containing the error message