public class DataFileParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String[][] |
FileData |
java.lang.String |
itsFileName |
java.lang.String |
itsFilePath |
Constructor and Description |
---|
DataFileParser()
constructor for the DataFileParser class if no text file name is provided
|
DataFileParser(java.lang.String filePath)
standard constructor for the DataFileParser class
|
DataFileParser(java.lang.String filePath,
java.lang.String delimin)
standard constructor for the DataFileParser class
|
Modifier and Type | Method and Description |
---|---|
double[] |
copyDataArray(int col)
Constructor for the ECG_Analyzer class.
|
java.lang.String[] |
copyStringArray(int col)
Constructor for the ECG_Analyzer class.
|
int |
getNColumns()
provides read access to private variable nCols
|
int |
getNDataRows()
returns the number of valid data rows that were read from the text file
|
int |
getNRows()
provides read access to private variable nRows
|
void |
listinFileInfo()
report some info on the content read from the text file
|
void |
listinFileInfo(int startLine,
int endLine)
report some info on the content read from the text file
|
void |
readToInternalArray()
nitty gritty of reading and parsing, it first steps thrpugh and gets the number * of rows and columns, then opens an array of that size to read into, then fills * it with the content of the file in a second pass
|
void |
setDelimiters(java.lang.String delim)
sets the delimiters for the fields in the text file as a regular expression
|
public java.lang.String[][] FileData
public java.lang.String itsFilePath
public java.lang.String itsFileName
public DataFileParser(java.lang.String filePath) throws java.lang.Exception
filePath
- specifies the name and path of the text file to read from * @param firstLIneAsLabels speficies whether the first row of the text file contains
column labels instead of datajava.lang.Exception
public DataFileParser(java.lang.String filePath, java.lang.String delimin) throws java.lang.Exception
filePath
- specifies the name and path of the text file to read from * @param firstLIneAsLabels speficies whether the first row of the text file contains
column labels instead of datajava.lang.Exception
public DataFileParser() throws java.lang.Exception
java.lang.Exception
public void setDelimiters(java.lang.String delim)
delim
- specifies the delimiters, e.g. "//s" breaks on all white spacespublic int getNColumns()
public int getNRows()
public int getNDataRows()
public void readToInternalArray()
public double[] copyDataArray(int col)
col
- the column to usepublic java.lang.String[] copyStringArray(int col)
col
- the column to usepublic void listinFileInfo()
public void listinFileInfo(int startLine, int endLine)
startLine
- row at which to startendLine
- row at which to endCopyright 2016