public class ShellHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static ShellHelper |
createShell(jdk.nashorn.api.scripting.ScriptObjectMirror scriptObjectMirror,
java.lang.String command)
Factory method to create a new shell.
|
void |
start()
Start the process and the reader thread.
|
void |
wrapup()
Kill the process and the reader thread.
|
void |
write(java.lang.String input)
Write to the stdin of the process.
|
public static ShellHelper createShell(jdk.nashorn.api.scripting.ScriptObjectMirror scriptObjectMirror, java.lang.String command)
scriptObjectMirror - The JavaScript instance invoking the shell.command - The command to be executed.public void write(java.lang.String input)
throws java.io.IOException
input - The data to be sent to the process.java.io.IOException - If the string cannot be written.public void start()
public void wrapup()
throws java.io.IOException
java.io.IOException - Not thrown in this base class.