public abstract class LineBasedAdapter extends SimpleAdapter
Abstract adapter dedicated to line based input streams
The only method to implement is the single line level processLine() method
err, log, out
Constructor and Description |
---|
LineBasedAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
postProcess()
Call after processing lines
by default it sends the XML footer to output
|
void |
process()
Iterates input stream as individual lines
Each line is passed to the processLine() method for processing |
abstract java.lang.String |
processLine(long lineNumber,
java.lang.String line)
Line processing to override
|
append, appendError, appendLog, appendLog, close, directProcess, getErrorStream, getErrorWriter, getGrant, getInput, getInputReader, getInputStream, getLogStream, getLogWriter, getName, getOutput, getOutputStream, getOutputWriter, getParameter, getParameters, getProcessCount, getStatus, init, preProcess, setInputStream, setOutputStream, setParameter, setProcessCount, setStatus
public void process() throws java.lang.InterruptedException
Iterates input stream as individual lines
Each line is passed to the processLine() method for processing
java.lang.InterruptedException
public void postProcess()
SimpleAdapter
Call after processing lines by default it sends the XML footer to output
postProcess
in interface AdapterInterface
postProcess
in class SimpleAdapter
public abstract java.lang.String processLine(long lineNumber, java.lang.String line) throws java.lang.Exception, java.lang.InterruptedException
Line processing to override
lineNumber
- Input line number (1 is the first line)line
- Input linejava.lang.Exception
java.lang.InterruptedException
Copyright (c)2006-2014 Simplicite Software. All Rights Reserved.