public class ExecUtil extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ExecUtil.R |
| 限定符和类型 | 字段和说明 |
|---|---|
private static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
ExecUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ExecUtil.R |
execCommand(String command)
执行指令
|
static ExecUtil.R |
execCommand(String[] commands)
执行指令
|
static ExecUtil.R |
execCommand(String[] commands,
boolean isWait)
执行指令
|
static ExecUtil.R |
execCommand(String command,
boolean isWait)
执行指令
|
static ExecUtil.R |
getProcessR(Process process,
boolean isWait) |
static String |
getStreamStr(InputStream is)
接收的数据流取为字符串, charsetName 默认 GBK
|
static String |
getStreamStr(InputStream is,
String charsetName)
接收的数据流取为字符串
|
public static ExecUtil.R execCommand(String command)
command - 指令public static ExecUtil.R execCommand(String command, boolean isWait)
command - 指令isWait - 是否等待public static ExecUtil.R execCommand(String[] commands)
commands - 指令数组public static ExecUtil.R execCommand(String[] commands, boolean isWait)
commands - 指令数组isWait - 是否等待public static ExecUtil.R getProcessR(Process process, boolean isWait)
public static String getStreamStr(InputStream is)
is - 数据流public static String getStreamStr(InputStream is, String charsetName)
is - 数据流charsetName - 编码Copyright © 2024. All rights reserved.