weka.core.converters

## Class StreamTokenizerUtils

- java.lang.Object
- - weka.core.converters.StreamTokenizerUtils

- All Implemented Interfaces:
    java.io.Serializable, RevisionHandler

      public class StreamTokenizerUtils
      extends java.lang.Object
      implements java.io.Serializable, RevisionHandler

  Helper class for using stream tokenizers
  Version:
    $Revision: 9284 $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamTokenizerUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `errms(java.io.StreamTokenizer tokenizer, java.lang.String theMsg)` Throws error message with line number and last token read.
    `static void` | `getFirstToken(java.io.StreamTokenizer tokenizer)` Gets token, skipping empty lines.
    `java.lang.String` | `getRevision()` Returns the revision string.
    `static void` | `getToken(java.io.StreamTokenizer tokenizer)` Gets token.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StreamTokenizerUtils

          public StreamTokenizerUtils()

  - ### Method Detail

    - #### getRevision

          public java.lang.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(java.io.StreamTokenizer tokenizer)
                                    throws java.io.IOException

      Gets token, skipping empty lines.
      Parameters:
        `tokenizer` - the stream tokenizer
      Throws:
        `java.io.IOException` - if reading the next token fails

    - #### getToken

          public static void getToken(java.io.StreamTokenizer tokenizer)
                               throws java.io.IOException

      Gets token.
      Parameters:
        `tokenizer` - the stream tokenizer
      Throws:
        `java.io.IOException` - if reading the next token fails

    - #### errms

          public static void errms(java.io.StreamTokenizer tokenizer,
                   java.lang.String theMsg)
                            throws java.io.IOException

      Throws error message with line number and last token read.
      Parameters:
        `theMsg` - the error message to be thrown
        `tokenizer` - the stream tokenizer
      Throws:
        `java.io.IOException` - containing the error message