public class CsvCursor extends Object implements ForwardCursor, AutoCloseable
| Constructor and Description |
|---|
CsvCursor(Reader reader,
int separator)
Create a new cursor to read tabular data from a text stream.
|
CsvCursor(Reader reader,
int separator,
int stringQuote)
Create a new cursor to read tabular data from a text stream.
|
CsvCursor(Reader reader,
int separator,
int stringQuote,
String[] fieldNames)
Create a new cursor to read tabular data from a text stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying cursor.
|
boolean |
eof()
Retrieve the End of File status.
|
Object |
get(int index)
Read the field value.
|
Object |
get(String name)
Get the value of the field or null.
|
boolean |
next()
Read the next line of data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAs, getBoolean, getBooleanAs, getByte, getByteAs, getDouble, getDoubleAs, getFloat, getFloatAs, getInt, getIntAs, getLong, getLongAs, getShort, getShortAs, getString, getStringAsgetAs, getBoolean, getBooleanAs, getByte, getByteAs, getDouble, getDoubleAs, getFloat, getFloatAs, getInt, getIntAs, getLong, getLongAs, getShort, getShortAs, getString, getStringAspublic CsvCursor(Reader reader, int separator, int stringQuote, String[] fieldNames)
Allow to specify the fields name.
reader - separator - stringQuote - public CsvCursor(Reader reader, int separator, int stringQuote)
reader - separator - stringQuote - public CsvCursor(Reader reader, int separator)
reader - separator - public boolean eof()
eof in interface ForwardCursorpublic boolean next()
next in interface ForwardCursorpublic Object get(int index)
get in interface IndexedFieldsindex - Index of the field to read.public Object get(String name)
get in interface NamedFieldsname - Field namepublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2014. All rights reserved.