public final class InputProcessors extends Object
InputProcessor
classes.Modifier and Type | Method and Description |
---|---|
static InputProcessor |
printing(OutputWriter out,
boolean resetEnabled)
Returns the processor printing all characters passed for processing to
the given output writer.
|
static InputProcessor |
printing(OutputWriter out,
LineConvertor convertor,
boolean resetEnabled)
Returns the processor converting whole lines with convertor and
printing the result including unterminated tail (if present) to the
given output writer.
|
@NonNull public static InputProcessor 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 charactersresetEnabled
- determines whether the reset operation will work
(will reset the writer if so)@NonNull public static InputProcessor 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 whole lines
before printing, may be null
resetEnabled
- determines whether the reset operation will work
(will reset the writer if so)LineConvertor