code: public static int invokeProcess(String[] commandLine, Reader input, Consumer<String> consumer)
              throws IOException, InterruptedException {
          return invokeProcess(commandLine, input, new DelegatingConsumer(consumer));
      }
docs: Runs the given set of command line arguments as a system process and returns the exit value of the spawned
  process. Additionally allows to supply an input stream to the invoked program. Outputs of the process (both
  normal and error) are passed to the {@code consumer}.
  
  @param commandLine
  the list of command line arguments to run
  @param input
  the input passed to the program
  @param consumer
  the consumer for the program's output
  
  @return the exit code of the process
  
  @throws IOException
  if an exception occurred while reading the process' outputs, or writing the process' inputs
  @throws InterruptedException
  if an exception occurred during process exception