|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object olg.csv.base.AbstractSheetReader olg.csv.base.ods.ODSReader
public class ODSReader
ODS Reader based on ODFDOM API.
Nested Class Summary | |
---|---|
static class |
ODSReader.ODSCellFormatter
Define a default cell format strategy. |
Field Summary | |
---|---|
private Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell> |
cellFormatter
The cell formatter. |
private boolean |
closeInputStream
Indicate if the stream must be closed on close invocation. |
private InputStream |
input
the stream. |
private static org.slf4j.Logger |
LOGGER
The class logger. |
private org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument |
odfDocument
the ODS Document read from the stream. |
private int |
rowCount
the nb of rows in the sheet. |
private org.odftoolkit.odfdom.doc.table.OdfTable |
sheet
The sheet on which read. |
Fields inherited from class olg.csv.base.AbstractSheetReader |
---|
beginAtColumn, beginAtRow, endAtColumn, endAtRow, recordIndex, rowSize, sheetName, sheetNum, skipEmptyCell, withHeaders |
Constructor Summary | |
---|---|
ODSReader(File odsFile,
ODSSettings settings)
|
|
ODSReader(InputStream input,
ODSSettings settings)
|
Method Summary | |
---|---|
void |
close()
Closes this stream and catch and logs IOException if necessary. if the parent stream is provided and passed to ODSReader constructor by user, user must close it (closes what you opens!) |
protected int |
defineRowSize()
Returns the expected rows length of each line. |
protected void |
doOnInitSheet()
Method called by AbstractSheetReader.initSheet() to allow concret SheetReader to do
some stuff on its instanciation. |
protected int |
getRows()
Get the row count of this sheet. |
protected Row |
setNext()
Returns the next Row. |
Methods inherited from class olg.csv.base.AbstractSheetReader |
---|
getSheetName, getSheetNum, hasNext, initSheet, isWithHeaders, next, padding, 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 final Formatter<org.odftoolkit.odfdom.doc.table.OdfTableCell> cellFormatter
private boolean closeInputStream
private final InputStream input
private org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument odfDocument
private org.odftoolkit.odfdom.doc.table.OdfTable sheet
private int rowCount
Constructor Detail |
---|
public ODSReader(File odsFile, ODSSettings settings) throws IOException
odsFile
- the ODS File to read.settings
- ods settings. If sheetname setting is defined try to find a
sheet with this name otherwise try to read sheet at sheetNum
position in sheets list. Must be not null and have a cell
formatter.
IOException
- if an error occurs during opening file,i.e the specified
sheet has been not foundpublic ODSReader(InputStream input, ODSSettings settings) throws IOException
input
- the stream to read.settings
- ods settings. If sheetname setting is defined try to find a
sheet with this name otherwise try to read sheet at sheetNum
position in sheets list. Must be not null and have a cell
formatter.
IOException
- if an error occurs during opening file,i.e the specified
sheet has been not foundMethod Detail |
---|
protected void doOnInitSheet() throws IOException
AbstractSheetReader
AbstractSheetReader.initSheet()
to allow concret SheetReader to do
some stuff on its instanciation.
doOnInitSheet
in class AbstractSheetReader
IOException
- if I/O error occurs.public void close()
close
in interface Closeable
close
in class AbstractSheetReader
protected Row setNext()
AbstractSheetReader
setNext
in class AbstractSheetReader
protected int getRows()
AbstractSheetReader
getRows
in class AbstractSheetReader
protected int defineRowSize()
AbstractSheetReader
defineRowSize
in class AbstractSheetReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |