All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.ants.utils.LineListTokenizer
java.lang.Object
   |
   +----java.io.StreamTokenizer
           |
           +----edu.utah.janos.ants.utils.LineListTokenizer

  Summary

public class  LineListTokenizer
     extends java.io.StreamTokenizer
{
          // Fields 1
     private static final int MAXLIST;

          // Constructors 2
     public LineListTokenizer(Reader);
     public LineListTokenizer(String) throws FileNotFoundException;

          // Methods 2
     public String[] list() throws LineListException;
     public int ll_nextToken() throws LineListException;
}

File reading utility. Returns each useful line of text as an array of strings, one string per "word." Comments are ignored and quoted strings are handled (the quotes are stripped off and the quoted string is returned as a single word.

Max of 256 words per line (see MAXLIST).

Author:
David Wetherall




  Fields

· MAXLIST

Summary  |  Top

   private static final int MAXLIST

Sorry, no more than 256 elements per line.


  Constructors

· LineListTokenizer

Summary  |  Top

   public LineListTokenizer(String file)  throws FileNotFoundException

Create a new LineListTokenizer for the given file.

Parameter Description
file the file to use as input.

Throws: FileNotFoundException
if the given file cannot be opened for reading.


· LineListTokenizer

Summary  |  Top
   public LineListTokenizer(Reader input) 

Create a new LineListTokenizer from the given readable Stream.

Parameter Description
input the Reader to stream input from.



  Methods

· ll_nextToken

Summary  |  Top
   public int ll_nextToken()  throws LineListException


· list

Summary  |  Top
   public String[] list()  throws LineListException

Parse the next non-empty line into an array of strings. Result is null when EOF, and otherwise has at least one element.

XXX rename to nextLine()

Returns:
an array of tokens from the line.


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7