public class CSVReader extends Object implements ClosableReportingIterator<String[]>
| Modifier and Type | Field and Description |
|---|---|
String |
delimiter |
String |
encoding |
String[] |
header |
int |
headerRows |
Character |
quoteChar |
| Constructor and Description |
|---|
CSVReader(File source,
String encoding,
String delimiter,
Character quotes,
Integer headerRows) |
CSVReader(InputStream stream,
String encoding,
String delimiter,
Character quotes,
Integer headerRows) |
CSVReader(InputStream stream,
String encoding,
String delimiter,
Character quotes,
Integer headerRows,
int emptyLineCache) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
currLineNumber() |
Set<Integer> |
getEmptyLines() |
String |
getErrorMessage()
Return an informative message about the error encountered while iterating over row.
|
Exception |
getException()
Return the Exception encountered while iterating over row.
|
String[] |
getHeader()
Get the header, or null if none
|
int |
getReadRows() |
boolean |
hasNext() |
boolean |
hasRowError()
Return true if an error was encountered while iterating over row.
|
String[] |
next() |
void |
remove() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic final int headerRows
public CSVReader(File source, String encoding, String delimiter, Character quotes, Integer headerRows) throws IOException
IOExceptionpublic CSVReader(InputStream stream, String encoding, String delimiter, Character quotes, Integer headerRows) throws IOException
IOExceptionpublic CSVReader(InputStream stream, String encoding, String delimiter, Character quotes, Integer headerRows, int emptyLineCache) throws IOException
IOExceptionpublic void close()
close in interface AutoCloseablepublic int currLineNumber()
public Set<Integer> getEmptyLines()
public int getReadRows()
public boolean hasRowError()
ClosableReportingIteratorhasRowError in interface ClosableReportingIterator<String[]>public String getErrorMessage()
ClosableReportingIteratorgetErrorMessage in interface ClosableReportingIterator<String[]>public Exception getException()
ClosableReportingIteratorgetException in interface ClosableReportingIterator<String[]>Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.