public class ShellUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
ShellUtil.DefaultStreamHandler |
static interface |
ShellUtil.StreamHandler |
class |
ShellUtil.SysExecResult |
| Constructor and Description |
|---|
ShellUtil() |
ShellUtil(ShellUtil.StreamHandler out,
ShellUtil.StreamHandler err) |
| Modifier and Type | Method and Description |
|---|---|
ShellUtil.SysExecResult |
runBashScript(String script,
String[] envp,
File dir) |
ShellUtil.SysExecResult |
runBashScriptPopWin(String script,
String[] envp,
File dir,
String termParam) |
ShellUtil.SysExecResult |
runWinCmd(String script,
String[] envp,
File dir) |
ShellUtil.SysExecResult |
runWinCmdPopWin(String script,
String[] envp,
File dir) |
void |
setStderrCallback(ShellUtil.StreamHandler stderrCallback) |
void |
setStdoutCallback(ShellUtil.StreamHandler stdoutCallback) |
String |
transInStream2String(InputStream inStream) |
static String |
transInStream2String(InputStream stream,
Charset charset) |
public ShellUtil()
public ShellUtil(ShellUtil.StreamHandler out, ShellUtil.StreamHandler err)
public void setStdoutCallback(ShellUtil.StreamHandler stdoutCallback)
public void setStderrCallback(ShellUtil.StreamHandler stderrCallback)
public ShellUtil.SysExecResult runBashScript(String script, String[] envp, File dir) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic ShellUtil.SysExecResult runBashScriptPopWin(String script, String[] envp, File dir, String termParam) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic ShellUtil.SysExecResult runWinCmd(String script, String[] envp, File dir) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic ShellUtil.SysExecResult runWinCmdPopWin(String script, String[] envp, File dir) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic String transInStream2String(InputStream inStream) throws IOException
IOExceptionpublic static String transInStream2String(InputStream stream, Charset charset) throws IOException
IOExceptionCopyright © 2016. All rights reserved.