|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectru.sstu.tables.XlsxTableReader
public class XlsxTableReader
XlsxTableReader class provides data read from Excel 2007 file.
| Constructor Summary | |
|---|---|
XlsxTableReader()
|
|
| Method Summary | ||
|---|---|---|
void |
addConverter(Class<?> fromClass,
Class<?> toClass,
Converter converter)
Adds support for converting values from fromClass to
toClass. |
|
Converter |
getConverter(Class<?> fromClass,
Class<?> toClass)
Provides converter for given types. |
|
protected boolean |
hasNextLine()
|
|
protected void |
init(InputStream input,
int index)
Data reader initialization. |
|
protected void |
nextLine()
Moves reader to next line of data. |
|
protected Object |
nextValue(int index)
Reads next value. |
|
|
read(Mapping<T> mapping,
InputStream input)
Reads table data from given input stream. |
|
|
read(Mapping<T> mapping,
InputStream input,
int tableIndex)
Reads table data from given input stream. |
|
void |
setDateFormat(String dateFormat)
Sets used date format. |
|
protected void |
setRows(Iterator<org.apache.poi.ss.usermodel.Row> rows)
Sets rows data. |
|
void |
skip(int count)
Skips data of size count. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XlsxTableReader()
| Method Detail |
|---|
protected void init(InputStream input,
int index)
throws TableException
input - input streamindex - table index
TableException - if cannot initialize data reader
protected void nextLine()
throws TableException
TableException - if cannot move readerprotected boolean hasNextLine()
true if next line of data can be read
protected Object nextValue(int index)
throws TableException
index - value index
TableException - if cannot read valueprotected void setRows(Iterator<org.apache.poi.ss.usermodel.Row> rows)
rows - the rows to set
public <T> List<T> read(Mapping<T> mapping,
InputStream input)
throws TableException
read in interface TableReaderT - type of table rowmapping - mapping for class and tableinput - input stream for table data
TableException - if cannot read data
public <T> List<T> read(Mapping<T> mapping,
InputStream input,
int tableIndex)
throws TableException
read in interface TableReaderT - type of table rowmapping - mapping for class and tableinput - input stream for table datatableIndex - index of table to be read (if input stream has more
then 1 table)
TableException - if cannot read datapublic void skip(int count)
count.
skip in interface TableReadercount - data to be skipped
public void addConverter(Class<?> fromClass,
Class<?> toClass,
Converter converter)
fromClass to
toClass.
addConverter in interface TableReaderfromClass - from classtoClass - to classconverter - converter
public Converter getConverter(Class<?> fromClass,
Class<?> toClass)
throws TableException
getConverter in interface TableReaderfromClass - from classtoClass - to class
TableException - if desired converter does not existTableReader.addConverter(Class, Class, Converter)public void setDateFormat(String dateFormat)
setDateFormat in interface TableReaderdateFormat - date formatSimpleDateFormat
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||