Writing to Subprocess's Standard Input
<p>I'm spawning a process in Java using the following code:</p>

<pre><code>Process newExec = null;
BufferedReader outStream = null;
BufferedReader inStream = null;
BufferedReader errStream = null;

StringBuffer outputBuffer = new StringBuffer();

String PATH_TO_EXEC = config.getExecPath();

try {
    newExec = Runtime.getRuntime().exec(PATH_TO_EXEC + " " +  args);
}
catch(IOException e){
    outputBuffer.append("Error in running executable.");
    e.printStackTrace();
    return outputBuffer.toString();
}
</code></pre>

<p>After the process is spawned it expects some input through stdin. How would I stream strings to this newly-spawned program?</p>
