public ProcessBuilder redirectInput (Redirect source)

Sets this process builder's standard input source. Subprocesses subsequently started by this object's start() method obtain their standard input from this source.

If the source is Redirect.PIPE (the initial value), then the standard input of a subprocess can be written to using the output stream returned by Process.getOutputStream(). If the source is set to any other value, then Process.getOutputStream() will return a null output stream.

Parameters:
source    the new standard input source

Returns:  this process builder

Exceptions:
IllegalArgumentException     if the redirect does not correspond to a valid source of data, that is, has type WRITE or APPEND

Since:  1.7