Package adams.data.io.input
Class AccessSpreadSheetReader.ChunkReader
- java.lang.Object
-
- adams.data.io.input.AccessSpreadSheetReader.ChunkReader
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- AccessSpreadSheetReader
public static class AccessSpreadSheetReader.ChunkReader extends Object implements Serializable
Reads data from the table in chunks.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_ChunkSize
the chunk size.protected int
m_FirstRow
the first row to retrieve (1-based).protected SpreadSheet
m_Header
the header.protected int
m_NumRows
the number of rows to retrieve (less than 1 = unlimited).protected AccessSpreadSheetReader
m_Owner
the owning reader.protected int
m_RowCount
the rows read so far.protected com.healthmarketscience.jackcess.Table
m_Table
the table in use.
-
Constructor Summary
Constructors Constructor Description ChunkReader(AccessSpreadSheetReader owner)
Initializes the low-level reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
close()
Closes the reader.boolean
hasNext()
Returns whether there is more data to be read.SpreadSheet
next()
Reads the next chunk.SpreadSheet
read(com.healthmarketscience.jackcess.Table table)
Reads the spreadsheet content from the specified table.
-
-
-
Field Detail
-
m_Owner
protected AccessSpreadSheetReader m_Owner
the owning reader.
-
m_Table
protected com.healthmarketscience.jackcess.Table m_Table
the table in use.
-
m_Header
protected SpreadSheet m_Header
the header.
-
m_ChunkSize
protected int m_ChunkSize
the chunk size.
-
m_RowCount
protected int m_RowCount
the rows read so far.
-
m_FirstRow
protected int m_FirstRow
the first row to retrieve (1-based).
-
m_NumRows
protected int m_NumRows
the number of rows to retrieve (less than 1 = unlimited).
-
-
Constructor Detail
-
ChunkReader
public ChunkReader(AccessSpreadSheetReader owner)
Initializes the low-level reader.- Parameters:
owner
- the owning reader
-
-
Method Detail
-
next
public SpreadSheet next()
Reads the next chunk.- Returns:
- the next chunk
-
close
protected void close()
Closes the reader.
-
hasNext
public boolean hasNext()
Returns whether there is more data to be read.- Returns:
- true if more data available
-
read
public SpreadSheet read(com.healthmarketscience.jackcess.Table table)
Reads the spreadsheet content from the specified table.- Parameters:
table
- the table to read from- Returns:
- the spreadsheet or null in case of an error
-
-