public class CSVReader
extends java.lang.Object
Constructor and Description |
---|
CSVReader(AdapterInputSource adapterInputSource)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the source and release the input source.
|
boolean |
getAndClearIsReset()
Return and set to false the isReset value, which is set to
true whenever the CSVReader is reset.
|
java.lang.String[] |
getNextRecord()
Get the next record from the CSV file.
|
boolean |
isResettable()
Return true if this CSVReader supports the reset() method.
|
void |
reset()
Reset the source to the beginning of the file.
|
void |
setIsUsingTitleRow(boolean isUsingTitleRow)
Set the isUsingTitleRow value.
|
void |
setLooping(boolean looping)
Set the looping value.
|
public CSVReader(AdapterInputSource adapterInputSource) throws com.espertech.esper.client.EPException
adapterInputSource
- - the source of the CSV filecom.espertech.esper.client.EPException
- in case of errors in reading the CSV filepublic void close() throws com.espertech.esper.client.EPException
com.espertech.esper.client.EPException
- in case of error in closing resourcespublic java.lang.String[] getNextRecord() throws java.io.EOFException, com.espertech.esper.client.EPException
java.io.EOFException
- in case no more records can be read (end-of-file has been reached and isLooping is false)com.espertech.esper.client.EPException
- in case of error in reading the CSV filepublic void setIsUsingTitleRow(boolean isUsingTitleRow)
isUsingTitleRow
- - true if the CSV file contains a valid title rowpublic void setLooping(boolean looping)
looping
- - true if processing should start over from the beginning after the end of the CSV file is reachedpublic void reset()
com.espertech.esper.client.EPException
- in case of errors in resetting the sourcepublic boolean getAndClearIsReset()
public boolean isResettable()