public class RuntimeUtil extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
RuntimeUtil.R
响应的结果
|
| 限定符和类型 | 字段和说明 |
|---|---|
private static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
RuntimeUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static RuntimeUtil.R |
exec(String command)
执行指令
|
static RuntimeUtil.R |
exec(String[] commands)
执行指令
|
static RuntimeUtil.R |
exec(String[] commands,
boolean isWait)
执行指令
|
static RuntimeUtil.R |
exec(String command,
boolean isWait)
执行指令
|
static RuntimeUtil.R |
getProcessR(Process process,
boolean isWait)
从进城获取响应数据
|
static String |
getStreamStr(InputStream is)
接收的数据流取为字符串
|
static String |
getStreamStr(InputStream is,
Charset charset)
接收的数据流取为字符串
|
public static RuntimeUtil.R exec(String command)
command - 指令public static RuntimeUtil.R exec(String command, boolean isWait)
command - 指令isWait - 是否等待public static RuntimeUtil.R exec(String[] commands)
commands - 指令数组public static RuntimeUtil.R exec(String[] commands, boolean isWait)
commands - 指令数组isWait - 是否等待public static RuntimeUtil.R getProcessR(Process process, boolean isWait)
process - 进程isWait - 是否等待public static String getStreamStr(InputStream is)
is - 数据流public static String getStreamStr(InputStream is, Charset charset)
is - 数据流charset - 编码Copyright © 2024. All rights reserved.