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 |
getObject(int index)
Read the field value.
|
Object |
getObject(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.
public CsvCursor(Reader reader, int separator, int stringQuote)
public CsvCursor(Reader reader, int separator)
public boolean eof()
eof in interface ForwardCursorpublic boolean next()
next in interface ForwardCursorpublic Object getObject(int index)
getObject in interface IndexedFieldAccessorsindex - Index of the field to read.public Object getObject(String name)
getObject in interface NamedFieldAccessorsname - Field namepublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2015. All rights reserved.