Class StreamGobbler

  • All Implemented Interfaces:
    Runnable

    public class StreamGobbler
    extends Thread
    Starts a thread that reads lines from an input stream, logs them, and stores them in an array list. The list of stored lines is used to search for expected output.

    Used for consuming stdout and stderr of processes. Processes get blocked when their output buffers are full. Consuming their output prevents them from getting blocked.