public class FileUtils extends Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
drainInputStream(InputStream source,
OutputStream sink) |
static int |
executeCommand(List<String> args) |
static int |
executeCommand(String... args) |
static ProcessBuilder |
prepareCommand(List<String> args,
Path commandDir) |
static List<String> |
readAllLines(InputStream source) |
static void |
traceCommand(ProcessBuilder command) |
static void |
traceCommandOutput(List<String> lines) |
public static void drainInputStream(InputStream source, OutputStream sink)
public static List<String> readAllLines(InputStream source)
public static int executeCommand(String... args) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static int executeCommand(List<String> args) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static ProcessBuilder prepareCommand(List<String> args, Path commandDir) throws IOException
IOExceptionpublic static void traceCommand(ProcessBuilder command)