Class ConsoleOutputProcessReader

  • All Implemented Interfaces:
    java.lang.Runnable

    public class ConsoleOutputProcessReader
    extends AbstractProcessReader
    Just outputs the data to stdout/stderr.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • PREFIX_STDOUT

        public static java.lang.String PREFIX_STDOUT
        the default prefix for stdout.
      • PREFIX_STDERR

        public static java.lang.String PREFIX_STDERR
        the default prefix for stderr.
      • m_Prefix

        protected java.lang.String m_Prefix
        the prefix to use.
    • Constructor Detail

      • ConsoleOutputProcessReader

        public ConsoleOutputProcessReader​(boolean stdout)
        Initializes the reader.
        Parameters:
        stdout - whether to read stdout or stderr
      • ConsoleOutputProcessReader

        public ConsoleOutputProcessReader​(boolean stdout,
                                          java.lang.String prefix)
        Initializes the reader.
        Parameters:
        stdout - whether to read stdout or stderr
        prefix - the prefix to use, null for auto-prefix
    • Method Detail

      • getPrefix

        public java.lang.String getPrefix()
        Returns the prefix in use.
        Returns:
        the prefix
      • process

        protected void process​(java.lang.String line)
        For processing the line read from stdout/stderr.
        Specified by:
        process in class AbstractProcessReader
        Parameters:
        line - the output line