|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jdbcimporter.parser.PatternDelimiterParser
The PatternDelimiterParser class implements the DelimiterParser interface to parse column values based on a java.text.MessageFormat pattern. It uses a custom Format class that includes several enhancements. The first column value will be parsed from the string where '{1}' is found in the pattern.
CustomMessageFormat
Constructor Summary | |
PatternDelimiterParser()
|
Method Summary | |
java.lang.String |
getNextRow()
Returns the next row to be imported as a String. |
ColumnValue[] |
getValues(java.lang.String nextRow)
Returns the column values for the row specified. |
void |
setPattern(java.lang.String pattern)
Sets the pattern to use when parsing values. |
void |
setReader(java.io.Reader input)
Sets the input source for the parser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PatternDelimiterParser()
Method Detail |
public void setReader(java.io.Reader input)
DelimiterParser
setReader
in interface DelimiterParser
input
- the source of the data to import.DelimiterParser.setReader(java.io.Reader)
public void setPattern(java.lang.String pattern)
pattern
- the patternpublic java.lang.String getNextRow() throws java.io.IOException
DelimiterParser
getNextRow
in interface DelimiterParser
java.io.IOException
- if an error occurs while retrieving the next rowDelimiterParser.getNextRow()
public ColumnValue[] getValues(java.lang.String nextRow) throws MalformedDataException
DelimiterParser
getValues
in interface DelimiterParser
nextRow
- the row to be parsed into column values
MalformedDataException
- if the row is not formatted properlyDelimiterParser.getValues(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |