|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.converters.csv.CSVParser.CSVReader
Private inner class encapsulating data structure used by the parsing algorithm.
| Field Summary | |
private int |
BUFFER_SIZE
|
private char[] |
charBlock
|
private char[] |
charBlockTemp
|
private int |
charsInCharBlock
|
private int |
cursorIdx
|
private int |
fieldStart
|
private boolean |
headerParsed
|
private boolean |
nextFieldIncludesDblQuotes
|
private boolean |
nextFieldInDblQuotes
|
private int |
numberOfColumns
|
private int |
numberOfRows
|
private java.util.Vector |
recordFields
|
| Constructor Summary | |
CSVParser.CSVReader()
Constructor. |
|
| Method Summary | |
protected void |
addField(boolean lineBreak)
Constructs a new field. |
protected void |
addRow(boolean lineBreak)
Adds a new row to the output. |
private java.lang.String |
extractFromDblQuotes(java.lang.String field)
Removes double quotes from a field value. |
protected char |
getChar()
Returns the current character. |
protected boolean |
next()
Moves cursor to the next position in the input. |
void |
nextFieldIncludesDblQuotes()
Indicates whether the next fields includes double quotes. |
void |
nextFieldInDblQuotes()
Indicates whether the next field is in double quotes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int BUFFER_SIZE
private int fieldStart
private int cursorIdx
private char[] charBlock
private char[] charBlockTemp
private int charsInCharBlock
private boolean nextFieldInDblQuotes
private boolean nextFieldIncludesDblQuotes
private int numberOfColumns
private int numberOfRows
private boolean headerParsed
private java.util.Vector recordFields
| Constructor Detail |
public CSVParser.CSVReader()
| Method Detail |
protected boolean next()
throws java.io.IOException,
CSVParseException,
java.sql.SQLException
java.io.IOException - if there was a problem reading from the input
java.sql.SQLException
CSVParseExceptionprotected char getChar()
protected void addField(boolean lineBreak)
lineBreak - true if there is a line break character at the end of the
field.
protected void addRow(boolean lineBreak)
throws CSVParseException,
java.sql.SQLException
lineBreak - true if there is a line break character at the end of the
field
CSVParseException
java.sql.SQLExceptionprivate java.lang.String extractFromDblQuotes(java.lang.String field)
field - field value
public void nextFieldIncludesDblQuotes()
public void nextFieldInDblQuotes()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||