Package com.carrotsearch.procfork
Class ForkedProcess
java.lang.Object
com.carrotsearch.procfork.ForkedProcess
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ForkedProcess
extends java.lang.Object
implements java.io.Closeable
-
Constructor Summary
Constructors Constructor Description ForkedProcess(java.lang.Process p, java.nio.file.Path processOutput) -
Method Summary
Modifier and Type Method Description voidclose()java.util.List<java.lang.ProcessHandle>destroyForcibly()java.lang.ProcessgetProcess()java.io.InputStreamgetProcessOutputAsStream()java.nio.file.PathgetProcessOutputFile()intwaitFor()
-
Constructor Details
-
ForkedProcess
public ForkedProcess(java.lang.Process p, java.nio.file.Path processOutput)
-
-
Method Details
-
getProcess
public java.lang.Process getProcess() -
destroyForcibly
public java.util.List<java.lang.ProcessHandle> destroyForcibly() -
getProcessOutputFile
public java.nio.file.Path getProcessOutputFile() -
getProcessOutputAsStream
public java.io.InputStream getProcessOutputAsStream() throws java.io.IOException- Throws:
java.io.IOException
-
waitFor
public int waitFor() throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-