|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectolg.csv.bean.BeanReader<E>
E - object this reader returnpublic class BeanReader<E>
Class specialized in reading objects from a file. Used a IReader to
read file as iterator of list of Strings. Used a BeanProcessor to transform a
list of strings returned by the reader into a new object.
IReader,
BeanProcessor| Field Summary | |
|---|---|
private IReader |
baseReader
The reader.Allows to read file as iterator of list of Strings. |
private IBeanProcessor<E> |
beanProcessor
The beanProcessor. |
private static org.slf4j.Logger |
LOGGER
The class logger. |
| Constructor Summary | |
|---|---|
BeanReader(File configFile,
IReader reader)
|
|
BeanReader(File configFile,
IReader reader,
boolean skipEmptyRow)
|
|
BeanReader(IBeanProcessor<E> beanProcessor,
IReader reader)
Constructs a BeanReader with a BeanProcessor and a reader. |
|
| Method Summary | |
|---|---|
void |
close()
|
boolean |
hasNext()
|
E |
next()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final org.slf4j.Logger LOGGER
private IReader baseReader
private IBeanProcessor<E> beanProcessor
| Constructor Detail |
|---|
public BeanReader(File configFile,
IReader reader)
throws LoadException
configFile - the file which describes how to load the transformer used to
transform list of String into new object. Must be not
null.reader - the reader to use. allows to iterate list of Strings from the
file the reader deals. Must be not null.
LoadException - if an error occurs during loading transformer from file
public BeanReader(File configFile,
IReader reader,
boolean skipEmptyRow)
throws LoadException
configFile - the file which describe how to load the transformer used to
transform list of String into new object. Must be not
null.reader - the reader to use. allows to iterate list of Strings from the
file the reader deals. Must be not null.skipEmptyRow - avoids reading blank lines and skip creating beans from them
LoadException - if an error occurs during loading transformer from file
public BeanReader(IBeanProcessor<E> beanProcessor,
IReader reader)
beanProcessor - the BeanProcessor. Must be not null.reader - the reader. If this reader products empty row, the Beanreader
could return empty bean(use IgnoreNullReader to avoid this
case). Must be not null.| Method Detail |
|---|
public void close()
close in interface Closeablepublic boolean hasNext()
hasNext in interface Iterator<E>
public E next()
throws ParseException
next in interface Iterator<E>ParseExceptionpublic void remove()
remove in interface Iterator<E>UnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||