Package org.apache.pulsar.utils
Class CmdUtility
- java.lang.Object
-
- org.apache.pulsar.utils.CmdUtility
-
public class CmdUtility extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CmdUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intexec(java.io.Writer writer, java.lang.String... command)Executes the specified string command in a separate process.
-
-
-
Method Detail
-
exec
public static int exec(java.io.Writer writer, java.lang.String... command) throws java.io.IOExceptionExecutes the specified string command in a separate process. STDOUT and STDERR output will be buffered to the givenwriter(Writer) argument.- Parameters:
writer- stdout and stderr outputcommand- a specified system command- Returns:
- exitValue 0: success, Non-zero: failure
- Throws:
java.io.IOException
-
-