public abstract class CSVReader extends Object implements DataContainer<CSVHeader,CSVRow>
| Modifier | Constructor and Description |
|---|---|
protected |
CSVReader(Character separator,
boolean containsHeader,
String headerPrefix,
String[] ignorePrefixes)
Creates a CSVIterator
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsHeader()
Returns true if this reader considers a header row
|
CSVHeader |
getHeader()
Returns the csv header created by this reader
|
String |
getHeaderPrefix()
Returns the prefix for the header line used by this reader
|
String[] |
getIgnorePrefixes()
Returns the array of prefixes for lines ignored by this reader
|
Character |
getSeparator()
Returns the csv row separator used by this reader
|
void |
initHeader()
Reads and created the csv header
|
abstract CSVIterator |
iterator()
Returns a
CSVIterator for this reader |
<T> List<T> |
map(Class<T> cl)
Maps this data container to a list of entities.
|
DataFrameBuilder |
toDataFrame()
Converts this reader into a
DataFrameBuilder. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected CSVReader(Character separator, boolean containsHeader, String headerPrefix, String[] ignorePrefixes)
separator - csv column separatorcontainsHeader - specifies whether file contains header rowheaderPrefix - specifies the prefix of the header rowignorePrefixes - array of prefixes for lines that should be ignoredpublic boolean containsHeader()
public String getHeaderPrefix()
public Character getSeparator()
public CSVHeader getHeader()
getHeader in interface DataContainer<CSVHeader,CSVRow>public String[] getIgnorePrefixes()
public void initHeader()
public abstract CSVIterator iterator()
CSVIterator for this readerpublic DataFrameBuilder toDataFrame()
DataFrameBuilder.DataFrameBuilder for this csv reader.public <T> List<T> map(Class<T> cl)
DataContainermap in interface DataContainer<CSVHeader,CSVRow>T - type of entitiescl - class of resulting entitiesDataMapper.map(DataContainer, Class)Copyright © 2017. All rights reserved.