Class ProcessUtils

java.lang.Object
net.bramp.ffmpeg.io.ProcessUtils

public final class ProcessUtils extends Object
Author:
bramp
  • Method Details

    • waitForWithTimeout

      public static int waitForWithTimeout(Process p, long timeout, TimeUnit unit) throws TimeoutException
      Waits until a process finishes or a timeout occurs
      Parameters:
      p - process
      timeout - timeout in given unit
      unit - time unit
      Returns:
      the process exit value
      Throws:
      TimeoutException - if a timeout occurs