Class PrintStreamHandler

  • All Implemented Interfaces:
    InvocationOutputHandler, org.apache.maven.shared.utils.cli.StreamConsumer
    Direct Known Subclasses:
    SystemOutHandler

    public class PrintStreamHandler
    extends java.lang.Object
    implements InvocationOutputHandler
    Offers an output handler that writes to a print stream like System.out.
    Since:
    2.0.9
    • Constructor Summary

      Constructors 
      Constructor Description
      PrintStreamHandler()
      Creates a new output handler that writes to System.out.
      PrintStreamHandler​(java.io.PrintStream out, boolean alwaysFlush)
      Creates a new output handler that writes to the specified print stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void consumeLine​(java.lang.String line)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrintStreamHandler

        public PrintStreamHandler()
        Creates a new output handler that writes to System.out.
      • PrintStreamHandler

        public PrintStreamHandler​(java.io.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 be null.
        alwaysFlush - A flag whether the print stream should be flushed after each line.
    • Method Detail

      • consumeLine

        public void consumeLine​(java.lang.String line)
        Specified by:
        consumeLine in interface org.apache.maven.shared.utils.cli.StreamConsumer