Class Launcher
java.lang.Object
com.ibm.wala.util.processes.Launcher
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
A thread that runs in a loop, performing the drain() action until a process terminates -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Launcher.Drainer
protected Launcher.Drainer
protected Thread
protected Thread
getEnv()
@Nullable byte[]
getInput()
@Nullable byte[]
@Nullable byte[]
@Nullable File
boolean
boolean
void
void
setInput
(byte[] input) Set input which will be fed to the launched process's stdinprotected void
setStdErr
(byte[] newErr) protected void
setStdOut
(byte[] newOutput) void
setWorkingDir
(File newWorkingDir) protected Process
spawnProcess
(@Nullable String cmd) Spawn a process to execute the given commandprotected Process
spawnProcess
(String[] cmd) Spawn a process to execute the given commandtoString()
-
Field Details
-
workingDir
-
env
-
stdOut
protected byte @Nullable [] stdOut -
stdErr
protected byte @Nullable [] stdErr
-
-
Constructor Details
-
Launcher
-
Launcher
-
-
Method Details
-
getWorkingDir
-
setWorkingDir
-
getEnv
-
setEnv
-
toString
-
spawnProcess
Spawn a process to execute the given command- Returns:
- an object representing the process
- Throws:
IllegalArgumentException
IOException
-
spawnProcess
Spawn a process to execute the given command- Returns:
- an object representing the process
- Throws:
IllegalArgumentException
IOException
-
drainStdOut
-
captureStdOut
-
drainStdErr
-
captureStdErr
-
isCaptureOutput
public boolean isCaptureOutput() -
isCaptureErr
public boolean isCaptureErr() -
getStdOut
@NullUnmarked public @Nullable byte[] getStdOut() -
getStderr
@NullUnmarked public @Nullable byte[] getStderr() -
setStdOut
protected void setStdOut(byte[] newOutput) -
setStdErr
protected void setStdErr(byte[] newErr) -
getInput
@NullUnmarked public @Nullable byte[] getInput() -
setInput
public void setInput(byte[] input) Set input which will be fed to the launched process's stdin
-