Package com.espertech.esperio.csv
Class CSVSource
java.lang.Object
com.espertech.esperio.csv.CSVSource
A wrapper for a Reader or an InputStream.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the underlying resource.boolean
Return true if the underlying resource is resettable.void
mark
(int readAheadLimit) Set the mark position.int
read()
Read from the underlying resource.void
reset()
Reset to the beginning of the resource.void
Reset to the last mark position.
-
Constructor Details
-
CSVSource
Ctor.- Parameters:
source
- - the AdapterInputSource from which to obtain the uderlying resource
-
-
Method Details
-
close
Close the underlying resource.- Throws:
IOException
- to indicate an io error
-
read
Read from the underlying resource.- Returns:
- the result of the read
- Throws:
IOException
- for io errors
-
isResettable
public boolean isResettable()Return true if the underlying resource is resettable.- Returns:
- true if resettable, false otherwise
-
resetToMark
Reset to the last mark position.- Throws:
IOException
- for io errors
-
mark
Set the mark position.- Parameters:
readAheadLimit
- is the maximum number of read-ahead events- Throws:
IOException
- when an io error occurs
-
reset
public void reset()Reset to the beginning of the resource.
-