code: public void setProcessInputStream(OutputStream os) {
      if (input != null) {
        if (input == System.in) {
          inputThread = createSystemInPump(input, os);
        }
        else {
          inputThread = createPump(input, os, true, true);
        }
      }
      else {
        try {
          os.close();
        }
        catch (IOException e) {
          log.info("Got exception while closing output stream", e);
        }
      }
    }
docs: Set the <CODE>OutputStream</CODE> by means of which input can be sent
  to the process.
  
  @param os
  the <CODE>OutputStream</CODE>.