public class CommandUtils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
CommandUtils.ExecResult |
| 构造器和说明 |
|---|
CommandUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static CommandUtils.ExecResult |
exec(String cmd)
执行command.
|
static CommandUtils.ExecResult |
exec(String[] cmdarray)
执行command.
|
static CommandUtils.ExecResult |
exec(String[] cmdarray,
ICommandStream infoStream,
ICommandStream errStream)
执行command.
|
static CommandUtils.ExecResult |
exec(String[] cmdarray,
String[] envp)
执行command.
|
static CommandUtils.ExecResult |
exec(String[] cmdarray,
String[] envp,
ICommandStream infoStream,
ICommandStream errStream)
执行command.
|
static CommandUtils.ExecResult |
exec(String[] cmdarray,
String[] envp,
String workdir,
ICommandStream infoStream,
ICommandStream errStream)
执行command.
|
static CommandUtils.ExecResult |
exec(String cmd,
ICommandStream infoStream,
ICommandStream errStream)
执行command.
|
public static CommandUtils.ExecResult exec(String cmd) throws OfExecuteCommandException
cmd - 命令.OfExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String cmd, ICommandStream infoStream, ICommandStream errStream) throws OfExecuteCommandException
cmd - 命令.infoStream - 提供接口以便接收信息流.errStream - 提供接口以便接收错误流.OfExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray) throws OfExecuteCommandException
cmdarray - 命令及参数.OfExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray, ICommandStream infoStream, ICommandStream errStream) throws OfExecuteCommandException
cmdarray - 命令及参数.infoStream - 提供接口以便接收信息流.errStream - 提供接口以便接收错误流.OfExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray, String[] envp) throws OfExecuteCommandException
cmdarray - 命令及参数.envp - 环境变量; 格式为 name=valueOfExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray, String[] envp, ICommandStream infoStream, ICommandStream errStream) throws OfExecuteCommandException
cmdarray - 命令及参数.envp - 环境变量; 格式为 name=valueinfoStream - 提供接口以便接收信息流.errStream - 提供接口以便接收错误流.OfExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray, String[] envp, String workdir, ICommandStream infoStream, ICommandStream errStream) throws OfExecuteCommandException
cmdarray - 命令及参数.envp - 环境变量; 格式为 name=valueworkdir - 工作目录infoStream - 提供接口以便接收信息流.errStream - 提供接口以便接收错误流.OfExecuteCommandException - 命令执行错误时发生Copyright © 2021. All rights reserved.