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.IOException
EcsvFormatException
public EcsvMeta getMeta()
public boolean next() throws java.io.IOException, EcsvFormatException
getCell(int)
or getRow()
methods.java.io.IOException
EcsvFormatException
public 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.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException