public class Processes extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
getOutputResult(boolean redirectError,
String... command)
获取输出结果
适用于不阻塞结果的命令 如: echo
可能会抛出运行时异常
|
static byte[] |
getOutputResult(String... command) |
static String |
getOutputResultString(boolean redirectError,
String... command) |
static String |
getOutputResultString(String... command) |
static byte[] |
getOutputResultWithDir(boolean redirectError,
String dir,
String... command)
获取输出结果
适用于不阻塞结果的命令
|
static byte[] |
getOutputResultWithDir(String dir,
String... command) |
static String |
getOutputResultWithDirString(boolean redirectError,
String dir,
String... command) |
static String |
getOutputResultWithDirString(String dir,
String... command) |
public static String getOutputResultString(boolean redirectError, String... command)
public static byte[] getOutputResult(String... command)
public static byte[] getOutputResult(boolean redirectError, String... command)
适用于不阻塞结果的命令 如: echo 可能会抛出运行时异常
redirectError
- 合并错误流到输出流command
- commandpublic static String getOutputResultWithDirString(String dir, String... command)
public static String getOutputResultWithDirString(boolean redirectError, String dir, String... command)
Copyright © 2024. All rights reserved.