Package 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 Description StreamTokenizerUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voiderrms(java.io.StreamTokenizer tokenizer, java.lang.String theMsg)Throws error message with line number and last token read.static voidgetFirstToken(java.io.StreamTokenizer tokenizer)Gets token, skipping empty lines.java.lang.StringgetRevision()Returns the revision string.static voidgetToken(java.io.StreamTokenizer tokenizer)Gets token.
-
-
-
Method Detail
-
getRevision
public java.lang.String getRevision()
Description copied from interface:RevisionHandlerReturns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-
getFirstToken
public static void getFirstToken(java.io.StreamTokenizer tokenizer) throws java.io.IOExceptionGets 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.IOExceptionGets 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.IOExceptionThrows error message with line number and last token read.- Parameters:
theMsg- the error message to be throwntokenizer- the stream tokenizer- Throws:
java.io.IOException- containing the error message
-
-