public class Exec extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Exec.Std |
| Constructor and Description |
|---|
Exec() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
arg(String line)
Parse command line by whitespace, supports quote and escaping `"one\" arg"`
|
static int |
run(File workDir,
BiConsumer<Exec.Std,String> handler,
List<String> cmd)
sync execute some commands
|
static int |
run(File workDir,
BiConsumer<Exec.Std,String> handler,
String... cmd)
sync execute some commands
|
static int |
run(File workDir,
List<String> out,
List<String> cmd)
sync execute some commands
|
static int |
run(File workDir,
List<String> out,
String... cmd)
sync execute some commands
|
static int |
run(File workDir,
StringBuilder out,
List<String> cmd)
sync execute a command
|
static int |
run(File workDir,
StringBuilder out,
String... cmd)
sync execute a command
|
static int |
run(ProcessBuilder builder,
BiConsumer<Exec.Std,String> handler)
sync execute some commands
|
public static int run(File workDir, StringBuilder out, List<String> cmd)
workDir - work dirout - outputcmd - commandpublic static int run(File workDir, StringBuilder out, String... cmd)
workDir - work dirout - outputcmd - commandpublic static int run(File workDir, List<String> out, List<String> cmd)
workDir - work dirout - outputcmd - commandpublic static int run(File workDir, List<String> out, String... cmd)
workDir - work dirout - outputcmd - commandpublic static int run(File workDir, BiConsumer<Exec.Std,String> handler, List<String> cmd)
workDir - work dircmd - commandhandler - out and err handlerpublic static int run(File workDir, BiConsumer<Exec.Std,String> handler, String... cmd)
workDir - work dircmd - commandhandler - out and err handlerpublic static int run(ProcessBuilder builder, BiConsumer<Exec.Std,String> handler)
builder - ProcessBuilderhandler - out and err handlerCopyright © 2023. All rights reserved.