code: public ProcessExecutor redirectOutput(OutputStream output) {
      if (output == null)
        output = NullOutputStream.NULL_OUTPUT_STREAM;
      PumpStreamHandler pumps = pumps();
      // Only set the output stream handler, preserve the same error stream handler
      return streams(new PumpStreamHandler(output, pumps == null ? null : pumps.getErr(), pumps == null ? null : pumps.getInput()));
    }
docs: Redirects the process' output stream to given output stream.
  If this method is invoked multiple times each call overwrites the previous.
  Use {@link #redirectOutputAlsoTo(OutputStream)} if you want to redirect the output to multiple streams.
  
  @param output output stream where the process output is redirected to (<code>null</code> means {@link NullOutputStream} which acts like a <code>/dev/null</code>).
  @return This process executor.