tpp
Class TSVFileReader

java.lang.Object
  extended by tpp.TSVFileReader

public class TSVFileReader
extends java.lang.Object

A generic class for reading TSV and CSV files.


Field Summary
static java.lang.String DEFAULT_DELIMITER
           
 
Constructor Summary
TSVFileReader()
           
 
Method Summary
 double[][] readDoubles(java.io.File file, java.lang.String delimiter, boolean header)
           
 java.lang.String[][] readStrings(java.io.File file, java.lang.String delimiter, boolean header)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DELIMITER

public static final java.lang.String DEFAULT_DELIMITER
See Also:
Constant Field Values
Constructor Detail

TSVFileReader

public TSVFileReader()
Method Detail

readStrings

public java.lang.String[][] readStrings(java.io.File file,
                                        java.lang.String delimiter,
                                        boolean header)
                                 throws java.io.IOException
Parameters:
file -
delimiter - if null then default to the default
header - whether this contains a header row. If so then the first line in the file is ignored
Returns:
Throws:
java.io.IOException

readDoubles

public double[][] readDoubles(java.io.File file,
                              java.lang.String delimiter,
                              boolean header)
                       throws java.io.IOException
Throws:
java.io.IOException