code: private static PumpStreamHandler redirectOutputAlsoTo(PumpStreamHandler pumps, OutputStream output) {
      if (output == null)
        throw new IllegalArgumentException("OutputStream must be provided.");
      OutputStream current = pumps.getOut();
      if (current != null && !(current instanceof NullOutputStream)) {
        output = new TeeOutputStream(current, output);
      }
      return new PumpStreamHandler(output, pumps.getErr(), pumps.getInput());
    }
docs: Redirects the process' output stream also to a given output stream.
  
  @return new stream handler created.