Package org.apache.maven.shared.invoker
Class PrintStreamHandler
java.lang.Object
org.apache.maven.shared.invoker.PrintStreamHandler
- All Implemented Interfaces:
InvocationOutputHandler,org.apache.maven.shared.utils.cli.StreamConsumer
- Direct Known Subclasses:
SystemOutHandler
Offers an output handler that writes to a print stream like
System.out.- Since:
- 2.0.9
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new output handler that writes toSystem.out.PrintStreamHandler(PrintStream out, boolean alwaysFlush) Creates a new output handler that writes to the specified print stream. -
Method Summary
-
Constructor Details
-
PrintStreamHandler
public PrintStreamHandler()Creates a new output handler that writes toSystem.out. -
PrintStreamHandler
Creates a new output handler that writes to the specified print stream.- Parameters:
out- The print stream to write to, must not benull.alwaysFlush- A flag whether the print stream should be flushed after each line.
-
-
Method Details
-
consumeLine
- Specified by:
consumeLinein interfaceorg.apache.maven.shared.utils.cli.StreamConsumer
-