|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.data.io.input.SqlDumpSpreadSheetReader.ChunkReader
public static class SqlDumpSpreadSheetReader.ChunkReader
Reads CSV files chunk by chunk.
| Field Summary | |
|---|---|
protected int |
m_ChunkSize
the chunk size. |
protected SpreadSheet |
m_Header
the header. |
protected List<String> |
m_HeaderCells
the header cells to use. |
protected SqlDumpSpreadSheetReader |
m_Owner
the owning reader. |
protected BufferedReader |
m_Reader
the reader in use. |
protected boolean |
m_UseBackslashes
whether to backslashes are used for escaping single quotes. |
| Constructor Summary | |
|---|---|
SqlDumpSpreadSheetReader.ChunkReader(SqlDumpSpreadSheetReader owner)
Initializes the low-level reader. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns whether there is more data to be read. |
SpreadSheet |
next()
Reads the next chunk. |
SpreadSheet |
read(Reader r,
int chunkSize)
Reads the spreadsheet content from the specified reader. |
protected List<String> |
readCells(Reader reader)
Reads a row and breaks it up into cells. |
protected void |
removeTrailingCR(StringBuilder current)
Removes a trailing CR. |
protected String |
unquote(String s)
Unquotes the given string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SqlDumpSpreadSheetReader m_Owner
protected BufferedReader m_Reader
protected SpreadSheet m_Header
protected int m_ChunkSize
protected boolean m_UseBackslashes
protected List<String> m_HeaderCells
| Constructor Detail |
|---|
public SqlDumpSpreadSheetReader.ChunkReader(SqlDumpSpreadSheetReader owner)
owner - the owning reader| Method Detail |
|---|
protected String unquote(String s)
s - the string to unquote, if necessary
protected void removeTrailingCR(StringBuilder current)
current - the current buffer
protected List<String> readCells(Reader reader)
throws IOException
reader - the reader to read from
IOException - if reading fails, e.g., due to IO errorpublic SpreadSheet next()
public boolean hasNext()
public SpreadSheet read(Reader r,
int chunkSize)
r - the reader to read fromchunkSize - the number of rows to read at a time
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||