public class FileUtils extends Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
drainInputStream(InputStream source,
OutputStream sink) |
static Process |
executeCommand(List<String> args) |
static Process |
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 Process executeCommand(String... args) throws IOException, InterruptedException
IOException
InterruptedException
public static Process executeCommand(List<String> args) throws IOException, InterruptedException
IOException
InterruptedException
public static ProcessBuilder prepareCommand(List<String> args, Path commandDir) throws IOException
IOException
public static void traceCommand(ProcessBuilder command)