public class EcsvReader
extends java.lang.Object
implements java.io.Closeable
| Constructor and Description |
|---|
EcsvReader(java.io.InputStream in,
YamlParser yamlParser,
MessagePolicy colCheck)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.lang.Object |
getCell(int icol)
Returns the contents of a cell in the current row.
|
EcsvMeta |
getMeta()
Returns the ECSV metadata object used by this reader.
|
java.lang.Object[] |
getRow()
Returns the contents of the current row, as an array
with one element per column.
|
boolean |
next()
Attempts to advance the current row to the next one.
|
public EcsvReader(java.io.InputStream in,
YamlParser yamlParser,
MessagePolicy colCheck)
throws java.io.IOException,
EcsvFormatException
in - input stream; doesn't need to be bufferedyamlParser - knows how to extrace ECSV metadata from YAMLcolCheck - what to do on CSV/YAML column name mismatchesjava.io.IOExceptionEcsvFormatExceptionpublic EcsvMeta getMeta()
public boolean next()
throws java.io.IOException,
EcsvFormatException
getCell(int) or getRow() methods.java.io.IOExceptionEcsvFormatExceptionpublic java.lang.Object getCell(int icol)
icol in the current rowpublic java.lang.Object[] getRow()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException