public final class LineProcessors extends Object
LineProcessor
classes.
Note that main difference between InputProcessor
and
LineProcessor
is that LineProcessor always process whole lines.
InputProcessors.bridge(org.netbeans.api.extexecution.base.input.LineProcessor)
Modifier and Type | Method and Description |
---|---|
static LineProcessor |
printing(OutputWriter out,
boolean resetEnabled)
Returns the processor printing all lines passed for processing to
the given output writer.
|
static LineProcessor |
printing(OutputWriter out,
LineConvertor convertor,
boolean resetEnabled)
Returns the processor converting lines with convertor and
printing the result to the given output writer.
|
@NonNull public static LineProcessor printing(@NonNull OutputWriter out, boolean resetEnabled)
Reset action on the returned processor resets the writer if it is enabled
by passing true
as resetEnabled
. Processor
closes the output writer on InputProcessor.close()
.
Returned processor is not thread safe.
out
- where to print received linesresetEnabled
- determines whether the reset operation will work
(will reset the writer if so)@NonNull public static LineProcessor printing(@NonNull OutputWriter out, @NullAllowed LineConvertor convertor, boolean resetEnabled)
null
) raw
lines are printed.
Reset action on the returned processor resets the writer if it is enabled
by passing true
as resetEnabled
. Processor
closes the output writer on InputProcessor.close()
.
Returned processor is not thread safe.
out
- where to print converted lines and charactersconvertor
- convertor converting the lines before printing,
may be null
resetEnabled
- determines whether the reset operation will work
(will reset the writer if so)LineConvertor