|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectolg.csv.base.csv.CSVReader
public final class CSVReader
CSV Reader. CSV Implementation of IReader.
Constructor Summary | |
---|---|
|
CSVReader(File file,
CSVSettings settings)
Constructor with custom settings. |
protected |
CSVReader(File file,
CSVSettings settings,
int bufSize)
Constructor with custom settings. |
|
CSVReader(InputStream input,
CSVSettings settings)
Constructor with custom settings. |
Method Summary | |
---|---|
void |
close()
Closes this stream and catches and logs IOException. if the parent stream is provided and passed to CSVReader constructor by user, user must close it (closes what you opens!) |
boolean |
hasNext()
|
boolean |
isWithHeaders()
Indicates the CSV file has a header line. |
Row |
next()
|
void |
remove()
CSVReader throws an UnsupportedOperationException. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSVReader(File file, CSVSettings settings) throws IOException
throws UnsupportedCharsetException if charset is not supported.
throws FileNotFoundException if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.
throws IllegalArgumentException if file, CSVSettings, lineSeparator
setting or charsetName setting is null
file
- the file to be read.settings
- the settings.
IOException
- if error occurs on file opening.to see default parameters values
protected CSVReader(File file, CSVSettings settings, int bufSize) throws IOException
throws UnsupportedCharsetException if charset is not supported.
throws FileNotFoundException if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.
file
- the file.settings
- the settingsbufSize
- the buffer size.
IOException
- if error occurs on file opening.to see default parameters values
public CSVReader(InputStream input, CSVSettings settings) throws IOException
throws UnsupportedCharsetException if charset is not supported.
throws IllegalArgumentException if input, CSVSettings or charsetName
setting is null
input
- the streamsettings
- the settings.
IOException
- if error occurs on stream buffering.to see default parameters values
Method Detail |
---|
public boolean isWithHeaders()
isWithHeaders
in interface IReader
public boolean hasNext()
hasNext
in interface Iterator<Row>
public Row next()
next
in interface Iterator<Row>
public void remove()
remove
in interface Iterator<Row>
public void close()
close
in interface Closeable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |