public abstract class BasicLineParser<T> extends Object implements LineParser<T>
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
MIN_PARSED_LINES_FOR_UPDATE, PARSE_ALERT_TIME_FREQUENCY_MS
PARSE_ALERT_FREQUENCY
Constructor and Description |
---|
BasicLineParser() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addResult(T obj) |
abstract Collection<T> |
getResults() |
void |
parse(File file)
Parse a
File |
void |
parse(InputStream is)
Parse a
InputStream . |
void |
parse(String filename)
Parse a file identified by its path.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parseOneLine
public abstract Collection<T> getResults()
getResults
in interface Parser<T>
public void parse(File file) throws IOException
Parser
File
parse
in interface Parser<T>
file
- fileIOException
- if there is a problem while manipulating the filepublic void parse(InputStream is) throws IOException
Parser
InputStream
.parse
in interface Parser<T>
is
- input streamIOException
- if there is a problem while manipulating the filepublic void parse(String filename) throws IOException
Parser
parse
in interface Parser<T>
filename
- Absolute path to the fileIOException
- if there is a problem while manipulating the fileprotected abstract void addResult(T obj)
Copyright © 2005–2023 Pavlidis lab, Michael Smith Laboratories and Department of Psychiatry, University of British Columbia. All rights reserved.