public class AutoClosableProcess extends Object implements AutoCloseable
Process
when exiting a try-with-resources statement.Modifier and Type | Class and Description |
---|---|
static class |
AutoClosableProcess.AutoClosableProcessBuilder
Builder for most sophisticated processes.
|
Constructor and Description |
---|
AutoClosableProcess(Process process) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static AutoClosableProcess.AutoClosableProcessBuilder |
create(String... commands) |
Process |
getProcess() |
static void |
runBlocking(String... commands) |
static AutoClosableProcess |
runNonBlocking(String... commands) |
public AutoClosableProcess(Process process)
public Process getProcess()
public static AutoClosableProcess runNonBlocking(String... commands) throws IOException
IOException
public static void runBlocking(String... commands) throws IOException
IOException
public static AutoClosableProcess.AutoClosableProcessBuilder create(String... commands)
public void close() throws IOException
close
in interface AutoCloseable
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.