com.huguesjohnson
Class DataFile

java.lang.Object
  |
  +--com.huguesjohnson.DataFile

public class DataFile
extends java.lang.Object

class DataFile


Constructor Summary
DataFile(java.lang.String fileName)
          constructor, uses default comment and delimiter characters
DataFile(java.lang.String fileName, java.lang.String comment, java.lang.String delimiter)
          constructor, uses default comment and delimiter characters
 
Method Summary
 void close()
          closes the file
 boolean endOfFile()
          endOfFile
 java.lang.String[] getNextLine()
          getNextLine, retrieves the next line of data
 java.lang.String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataFile

public DataFile(java.lang.String fileName)
constructor, uses default comment and delimiter characters

Parameters:
fileName - name & path of data file to open

DataFile

public DataFile(java.lang.String fileName,
                java.lang.String comment,
                java.lang.String delimiter)
constructor, uses default comment and delimiter characters

Parameters:
fileName - name & path of data file to open
comment - the comment character or string for the file
delimiter - the delimiter character or string for the file
Method Detail

endOfFile

public boolean endOfFile()
endOfFile

Returns:
true if at the end of the file

getNextLine

public java.lang.String[] getNextLine()
getNextLine, retrieves the next line of data

Returns:
String array containing a line of data

close

public void close()
closes the file


toString

public java.lang.String toString()
toString

Overrides:
toString in class java.lang.Object
Returns:
string representation of object