public class EcsvReader extends Object implements Closeable
Constructor and Description |
---|
EcsvReader(InputStream in,
YamlParser yamlParser,
MessagePolicy colCheck)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
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.
|
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(InputStream in, YamlParser yamlParser, MessagePolicy colCheck) throws 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 mismatchesIOException
EcsvFormatException
public EcsvMeta getMeta()
public boolean next() throws IOException, EcsvFormatException
getCell(int)
or getRow()
methods.IOException
EcsvFormatException
public Object getCell(int icol)
icol
in the current rowpublic Object[] getRow()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.