|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.util.csv.ReadCSV
public class ReadCSV
Read and parse CSV format files.
| Constructor Summary | |
|---|---|
ReadCSV(InputStream is,
boolean headers,
char delim)
Construct a CSV reader from an input stream. |
|
ReadCSV(InputStream is,
boolean headers,
CSVFormat format)
Construct a CSV reader from an input stream. |
|
ReadCSV(String filename,
boolean headers,
char delim)
Construct a CSV reader from a filename. |
|
ReadCSV(String filename,
boolean headers,
CSVFormat format)
Construct a CSV reader from a filename. |
|
| Method Summary | |
|---|---|
void |
close()
Close the file. |
static String |
displayDate(Date date)
Format a date. |
String |
get(int i)
Get the specified column as a string. |
String |
get(String column)
Get the column by its string name, as a string. |
int |
getColumnCount()
Get the column count. |
List<String> |
getColumnNames()
|
Date |
getDate(String column)
Get the column as a date. |
double |
getDouble(int index)
Get the column as a double specified by index. |
double |
getDouble(String column)
Get the specified column as a double. |
CSVFormat |
getFormat()
|
int |
getInt(int i)
Obtain a column as an integer referenced by a string. |
boolean |
hasMissing()
|
boolean |
next()
Read the next line. |
static Date |
parseDate(String when)
Parse a date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadCSV(InputStream is,
boolean headers,
char delim)
is - The InputStream to read from.headers - Are headers present?delim - What is the delimiter.
public ReadCSV(InputStream is,
boolean headers,
CSVFormat format)
is - The InputStream to read from.headers - Are headers present?format - What is the CSV format.
public ReadCSV(String filename,
boolean headers,
char delim)
filename - The filename.headers - The headers.delim - The delimiter.
public ReadCSV(String filename,
boolean headers,
CSVFormat format)
filename - The filename.headers - The headers.format - The format.| Method Detail |
|---|
public static String displayDate(Date date)
date - The date to format.
public static Date parseDate(String when)
when - The date string.
public void close()
public String get(int i)
i - The column index, starting at zero.
public String get(String column)
column - The column name.
public int getColumnCount()
public Date getDate(String column)
column - The column header name.
public double getDouble(int index)
index - The column index, starting at zero.
public double getDouble(String column)
column - The column name that we want to get.
public int getInt(int i)
i - The column header name being read.
public boolean next()
public List<String> getColumnNames()
public CSVFormat getFormat()
public boolean hasMissing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||