public abstract class GenericFileParser extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
GenericFileParser()
Constructor
|
protected |
GenericFileParser(String commentString)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
commentLine(int lineNumber,
String line)
Called for each comment line
|
protected abstract void |
dataLine(int lineNumber,
String line)
Specific processing for each data line
|
protected abstract void |
end()
Called when the parsing ends
|
protected String |
getCommentString()
Returns the comment string
|
abstract List<Object> |
getResult()
Returns the result of the file parsing
|
void |
parse(BufferedReader br)
Parse the given input
|
void |
parse(InputStream is)
Parse the given input
|
void |
parse(String sFileName)
Parse the given file
|
protected abstract void |
start()
Called when the parsing starts
|
protected abstract void |
voidLine(int lineNumber)
Called for each void line
|
protected GenericFileParser()
protected GenericFileParser(String commentString)
commentString - protected abstract void start()
protected abstract void commentLine(int lineNumber,
String line)
lineNumber - line - protected abstract void voidLine(int lineNumber)
lineNumber - protected abstract void dataLine(int lineNumber,
String line)
lineNumber - line - the line to processprotected abstract void end()
protected String getCommentString()
public void parse(String sFileName) throws FileNotFoundException, IOException
sFileName - FileNotFoundExceptionIOExceptionpublic void parse(InputStream is) throws IOException
is - IOExceptionpublic void parse(BufferedReader br) throws IOException
br - IOExceptionCopyright © 2016. All rights reserved.