Class CollectingProcessOutput

  • All Implemented Interfaces:
    java.io.Serializable

    public final class CollectingProcessOutput
    extends AbstractProcessOutput
    Collects the process output (stdout and stderr) and makes them available once the process finishes.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_StdOut

        protected java.lang.StringBuilder m_StdOut
        the stdout content.
      • m_StdErr

        protected java.lang.StringBuilder m_StdErr
        the stderr content.
    • Constructor Detail

      • CollectingProcessOutput

        public CollectingProcessOutput()
    • Method Detail

      • getStdOut

        public java.lang.String getStdOut()
        Returns the output on stdout.
        Returns:
        the output
      • getStdErr

        public java.lang.String getStdErr()
        Returns the output on stderr.
        Returns:
        the output
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Allows the execution of a command through this process output scheme.
        Parameters:
        args - the command to launch
        Throws:
        java.lang.Exception - if launching fails for some reason