public class ShellUtils
extends java.lang.Object
author: Blankj
blog : http://blankj.com
time : 2016/8/7
desc : Shell相关工具类
| Modifier and Type | Class and Description |
|---|---|
static class |
ShellUtils.CommandResult
返回的命令结果
|
| Modifier and Type | Method and Description |
|---|---|
static ShellUtils.CommandResult |
execCmd(java.util.List<java.lang.String> commands,
boolean isRoot)
是否是在root下执行命令
|
static ShellUtils.CommandResult |
execCmd(java.util.List<java.lang.String> commands,
boolean isRoot,
boolean isNeedResultMsg)
是否是在root下执行命令
|
static ShellUtils.CommandResult |
execCmd(java.lang.String[] commands,
boolean isRoot)
是否是在root下执行命令
|
static ShellUtils.CommandResult |
execCmd(java.lang.String[] commands,
boolean isRoot,
boolean isNeedResultMsg)
是否是在root下执行命令
|
static ShellUtils.CommandResult |
execCmd(java.lang.String command,
boolean isRoot)
是否是在root下执行命令
|
static ShellUtils.CommandResult |
execCmd(java.lang.String command,
boolean isRoot,
boolean isNeedResultMsg)
是否是在root下执行命令
|
public static ShellUtils.CommandResult execCmd(java.lang.String command, boolean isRoot)
command - 命令isRoot - 是否需要root权限执行public static ShellUtils.CommandResult execCmd(java.util.List<java.lang.String> commands, boolean isRoot)
commands - 多条命令链表isRoot - 是否需要root权限执行public static ShellUtils.CommandResult execCmd(java.lang.String[] commands, boolean isRoot)
commands - 多条命令数组isRoot - 是否需要root权限执行public static ShellUtils.CommandResult execCmd(java.lang.String command, boolean isRoot, boolean isNeedResultMsg)
command - 命令isRoot - 是否需要root权限执行isNeedResultMsg - 是否需要结果消息public static ShellUtils.CommandResult execCmd(java.util.List<java.lang.String> commands, boolean isRoot, boolean isNeedResultMsg)
commands - 命令链表isRoot - 是否需要root权限执行isNeedResultMsg - 是否需要结果消息public static ShellUtils.CommandResult execCmd(java.lang.String[] commands, boolean isRoot, boolean isNeedResultMsg)
commands - 命令数组isRoot - 是否需要root权限执行isNeedResultMsg - 是否需要结果消息