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
public class PrintStreamHandler extends Object implements InvocationOutputHandler
Offers an output handler that writes to a print stream likeSystem.out
.- Since:
- 2.0.9
-
-
Constructor Summary
Constructors Constructor Description PrintStreamHandler()
Creates 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.
-
-
-
Constructor Detail
-
PrintStreamHandler
public PrintStreamHandler()
Creates a new output handler that writes toSystem.out
.
-
PrintStreamHandler
public PrintStreamHandler(PrintStream out, boolean alwaysFlush)
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 Detail
-
consumeLine
public void consumeLine(String line)
- Specified by:
consumeLine
in interfaceorg.apache.maven.shared.utils.cli.StreamConsumer
-
-