public class CommandExecutor extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static CommandExecutor | create() | 
| int | execute(Command command,
       long timeoutMilliseconds)Execute command and display error and output streams in log. | 
| int | execute(Command command,
       StreamConsumer stdOut,
       StreamConsumer stdErr,
       long timeoutMilliseconds) | 
public static CommandExecutor create()
public int execute(Command command, StreamConsumer stdOut, StreamConsumer stdErr, long timeoutMilliseconds)
timeoutMilliseconds - any negative value means no timeout.TimeoutException - on timeout, since 4.4CommandException - on any other errorpublic int execute(Command command, long timeoutMilliseconds)
execute(Command, StreamConsumer, StreamConsumer, long) is preferable,
 when fine-grained control of output of command required.timeoutMilliseconds - any negative value means no timeout.CommandExceptionCopyright © 2009–2016 SonarSource. All rights reserved.