# Class: com.pnfsoftware.jeb.util.concurrent.CommandExec

An object to allow the execution of external commands with timeout.

## Constructor: CommandExec
- parameter: `timeout`, type: `long`

Description: Create an object with an optional timeout.
parameter: timeout: timeout in milliseconds            
            
- positive: target will be killed when timeout has ellapsed
-             
- zero: no timeout \(blocking execution\)
-             
- negative: asynchronous execution, [execute](#execute(String...)) will            always return true
-

## Method: execute
- parameter: `cmdlist`, type: `java.util.Collection<java.lang.String>`
- return type: `boolean`

Description: Execute a command. If execution takes more than the timeout provided at construction time, the executing process will be killed.
parameter: cmdlist: the command tokens \(command and arguments\), eg:            `["ls", "-l", "*.java"]`
return: true if the command successfully completed, false if it timed'out

## Method: execute
- parameter: `cmdarray`, type: `java.lang.String[]`
- return type: `boolean`

Description: Execute a command. If execution takes more than the timeout provided at construction time, the executing process will be killed.
parameter: cmdarray: the command tokens \(command and arguments\), eg:            `["ls", "-l", "*.java"]`
return: true if the command successfully completed, false if it timed'out

## Method: getOutput
- return type: `byte[]`

Description: Get the command output. There might be some output present even when the command was prematurely stopped because a timeout elapsed.
return: 

