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 dir,
ICommandStream infoStream,
ICommandStream errStream)
执行command.
|
static CommandUtils.ExecResult |
exec(String cmd,
ICommandStream infoStream,
ICommandStream errStream)
执行command.
|
public static CommandUtils.ExecResult exec(String cmd) throws BpExecuteCommandException
cmd - 命令.BpExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String cmd, ICommandStream infoStream, ICommandStream errStream) throws BpExecuteCommandException
cmd - 命令.infoStream - 提供接口以便接收信息流.errStream - 提供接口以便接收错误流.BpExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray) throws BpExecuteCommandException
cmdarray - 命令及参数.BpExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray, ICommandStream infoStream, ICommandStream errStream) throws BpExecuteCommandException
cmdarray - 命令及参数.infoStream - 提供接口以便接收信息流.errStream - 提供接口以便接收错误流.BpExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray, String[] envp) throws BpExecuteCommandException
cmdarray - 命令及参数.envp - 环境变量; 格式为 name=valueBpExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray, String[] envp, ICommandStream infoStream, ICommandStream errStream) throws BpExecuteCommandException
cmdarray - 命令及参数.envp - 环境变量; 格式为 name=valueinfoStream - 提供接口以便接收信息流.errStream - 提供接口以便接收错误流.BpExecuteCommandException - 命令执行错误时发生public static CommandUtils.ExecResult exec(String[] cmdarray, String[] envp, String dir, ICommandStream infoStream, ICommandStream errStream) throws BpExecuteCommandException
cmdarray - 命令及参数.envp - 环境变量; 格式为 name=valuedir - 工作目录infoStream - 提供接口以便接收信息流.errStream - 提供接口以便接收错误流.BpExecuteCommandException - 命令执行错误时发生Copyright © 2020. All rights reserved.