utils
Class LineListTokenizer

java.lang.Object
  |
  +--java.io.StreamTokenizer
        |
        +--utils.LineListTokenizer

public class LineListTokenizer
extends java.io.StreamTokenizer

File reading utility -- converts each non-empty line to a word list


Fields inherited from class java.io.StreamTokenizer
nval, sval, TT_EOF, TT_EOL, TT_NUMBER, TT_WORD, ttype
 
Constructor Summary
LineListTokenizer(java.lang.String file)
           
 
Method Summary
 java.lang.String[] list()
          Parse the next non-empty line into an array of strings.
static void main(java.lang.String[] args)
          Test the class.
 
Methods inherited from class java.io.StreamTokenizer
commentChar, eolIsSignificant, lineno, lowerCaseMode, nextToken, ordinaryChar, ordinaryChars, parseNumbers, pushBack, quoteChar, resetSyntax, slashSlashComments, slashStarComments, toString, whitespaceChars, wordChars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineListTokenizer

public LineListTokenizer(java.lang.String file)
                  throws java.io.FileNotFoundException
Method Detail

list

public java.lang.String[] list()
                        throws java.lang.Exception
Parse the next non-empty line into an array of strings. Result is null when EOF, and otherwise has at least one element.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test the class.