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
    void close()  
    java.util.List<java.lang.ProcessHandle> destroyForcibly()  
    java.lang.Process getProcess()  
    java.io.InputStream getProcessOutputAsStream()  
    java.nio.file.Path getProcessOutputFile()  
    int waitFor()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface java.io.Closeable
      Throws:
      java.io.IOException