Package org.apache.nutch.util

# Class CommandRunner

java.lang.Object
org.apache.nutch.util.CommandRunner

public class CommandRunner extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CommandRunner()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `evaluate()`
  `int`
  `exec()`
  Execute the command
  `String`
  `getCommand()`
  `int`
  `getExitValue()`
  `Throwable`
  `getThrownError()`
  `int`
  `getTimeout()`
  `boolean`
  `getWaitForExit()`
  `static void`
  `main(String[] args)`
  `void`
  `setCommand(String s)`
  `void`
  `setInputStream(InputStream is)`
  `void`
  `setStdErrorStream(OutputStream os)`
  `void`
  `setStdOutputStream(OutputStream os)`
  `void`
  `setTimeout(int timeout)`
  `void`
  `setWaitForExit(boolean waitForExit)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CommandRunner

    public CommandRunner()

- ## Method Details

  - ### getExitValue

    public int getExitValue()

  - ### setCommand

    public void setCommand(String s)

  - ### getCommand

    public String getCommand()

  - ### setInputStream

    public void setInputStream(InputStream is)

  - ### setStdOutputStream

    public void setStdOutputStream(OutputStream os)

  - ### setStdErrorStream

    public void setStdErrorStream(OutputStream os)

  - ### evaluate

    public void evaluate() throws IOException
    Throws:
      `IOException`

  - ### exec

    public int exec() throws IOException
    Execute the command
    Returns:
      process exit value (return code) or -1 if timed out.
    Throws:
      `IOException` - if there is a fatal error interfacing with the environment in which the application is running.

  - ### getThrownError

    public Throwable getThrownError()

  - ### getTimeout

    public int getTimeout()

  - ### setTimeout

    public void setTimeout(int timeout)

  - ### getWaitForExit

    public boolean getWaitForExit()

  - ### setWaitForExit

    public void setWaitForExit(boolean waitForExit)

  - ### main

    public static void main(String[] args) throws Exception
    Throws:
      `Exception`