|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jpkgmk.AbstractParser<T>
T - public abstract class AbstractParser<T>
Abstract class that provides some convenience methods for parsing files, strings etc. line by line.
| Field Summary | |
|---|---|
static char |
DEFAULT_LINE_DELIMITER
|
| Constructor Summary | |
|---|---|
AbstractParser()
|
|
| Method Summary | |
|---|---|
protected abstract T |
createResult()
|
static java.lang.String[] |
getLineItems(java.lang.String line)
Returns the items of the given line |
T |
parse(java.io.File file)
Parses the data from the given reader and returns the parsed object representing all these data. |
T |
parse(java.io.Reader data)
Parses the data from the given reader and returns the parsed object representing all these data. |
T |
parse(java.lang.String data)
Parses the data from the given reader and returns the parsed object representing all these data. |
protected abstract void |
parseAndAddLine(java.lang.String line,
T resultObject)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char DEFAULT_LINE_DELIMITER
| Constructor Detail |
|---|
public AbstractParser()
| Method Detail |
|---|
public T parse(java.lang.String data)
throws java.io.IOException
data - The input to be parsed
java.io.IOException - When something goes wrong during the LineCountingReader.readLine() invocationparse(Reader)
public T parse(java.io.File file)
throws java.io.IOException
file - The input to be parsed
java.io.IOException - When something goes wrong during the LineCountingReader.readLine() invocationparse(Reader)
public T parse(java.io.Reader data)
throws java.io.IOException
data - The input to be parsed
java.io.IOException - When something goes wrong during the LineCountingReader.readLine() invocationprotected abstract T createResult()
protected abstract void parseAndAddLine(java.lang.String line,
T resultObject)
public static final java.lang.String[] getLineItems(java.lang.String line)
line -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||