Package weka.core.converters
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$
- 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(StreamTokenizer tokenizer, String theMsg)Throws error message with line number and last token read.static voidgetFirstToken(StreamTokenizer tokenizer)Gets token, skipping empty lines.StringgetRevision()Returns the revision string.static voidgetToken(StreamTokenizer tokenizer)Gets token.
-
-
-
Method Detail
-
getRevision
public String getRevision()
Description copied from interface:RevisionHandlerReturns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- 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 throwntokenizer- the stream tokenizer- Throws:
IOException- containing the error message
-
-