class WcFileProcessor extends DefaultInputProcessor
| Constructor and Description |
|---|
WcFileProcessor(ExecutionContext context,
WcArguments args) |
| Modifier and Type | Method and Description |
|---|---|
void |
finish(Input input,
LineProcessor output)
Indicates that this line processing task is complete for the specified
input device and can finished. |
boolean |
processLine(Input input,
Line line,
LineProcessor output)
Processes a single line and returns true if this
InputProcessor
is ready to process more lines. |
beginpublic WcFileProcessor(ExecutionContext context, WcArguments args)
public boolean processLine(Input input, Line line, LineProcessor output)
InputProcessorInputProcessor
is ready to process more lines. Returning false indicates that the
process can be finished because
subsequent lines would not change the result anyway.processLine in interface InputProcessorprocessLine in class DefaultInputProcessorinput - the input device, the source of the given lineline - the line to processoutput - the output to write toInputProcessor is ready to process more
lines, and false if it does not require any more input linespublic void finish(Input input, LineProcessor output)
InputProcessorinput device and can finished.
Simple output devices usually perform a flush operation in this
method. More complex commands may perform the real operation in this
method, for instance write the total count of lines or words to the
target file or stream.
finish in interface InputProcessorfinish in class DefaultInputProcessorinput - the input device whose lines have now all been processedoutput - the output to write toCopyright © 2017. All Rights Reserved.