public class Executor extends Object
Constructor and Description |
---|
Executor() |
Modifier and Type | Method and Description |
---|---|
static void |
execute(String cmd)
Shorthand for
execute(String, java.io.OutputStream, java.io.OutputStream) using
System.out and System.err for the process's stdout and errout, respectively. |
static void |
execute(String cmd,
OutputStream out)
Shorthand for
execute(String, java.io.OutputStream, java.io.OutputStream) using
System.err for the process's errout and the given out for its stdout. |
static void |
execute(String cmd,
OutputStream out,
OutputStream err)
|
public static void execute(String cmd)
execute(String, java.io.OutputStream, java.io.OutputStream)
using
System.out
and System.err
for the process's stdout and errout, respectively.cmd
- The command to execute.public static void execute(String cmd, OutputStream out)
execute(String, java.io.OutputStream, java.io.OutputStream)
using
System.err
for the process's errout and the given out for its stdout.cmd
- The command to execute.out
- The stream to which to pipe the process's stdout.public static void execute(String cmd, OutputStream out, OutputStream err)
input
of the resulting
process to our System.in
, its stdout
to the given out stream
and its errout
to the given err stream.cmd
- The command to execute.out
- The stream to which to pipe the process's stdout.err
- The stream to which to pipe the process's errout.Copyright © 2007-2013 JBoss, a division of Red Hat, Inc. All Rights Reserved.