public class RunTools extends Object
RunTools class.
| Constructor and Description | 
|---|
| RunTools() | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | main(String[] args)
 main. | 
| static ReturnValue | runCommand(Map<String,String> env,
          String[] command) | 
| static ReturnValue | runCommand(Map<String,String> env,
          String[] command,
          int stdoutCapacity,
          int stderrCapacity) | 
| static ReturnValue | runCommand(Map<String,String> env,
          String[] command,
          int stdoutCapacity,
          int stderrCapacity,
          String permanentStoragePrefix)A simple command runner that captures the return value of the program. | 
| static ReturnValue | runCommand(String command)
 runCommand. | 
| static ReturnValue | runCommand(String[] command)
 runCommand. | 
| static Process | startCommand(Map<String,String> env,
            String[] command)An alternate runner that launches a process and returns it so that the caller can process it's output directly. | 
| static ReturnValue | waitAndGetReturn(Process p,
                int stdoutLineCapacity,
                int stderrLineCapacity,
                String permanentStoragePrefix)Wait on a process to finish, then parse information into return value | 
public static ReturnValue runCommand(String command)
runCommand.
command - a String object.ReturnValue object.public static ReturnValue runCommand(String[] command)
runCommand.
command - an array of String objects.ReturnValue object.public static ReturnValue runCommand(Map<String,String> env, String[] command)
public static ReturnValue runCommand(Map<String,String> env, String[] command, int stdoutCapacity, int stderrCapacity)
public static ReturnValue runCommand(Map<String,String> env, String[] command, int stdoutCapacity, int stderrCapacity, String permanentStoragePrefix)
command - an array of String objects.env - a Map object.stdoutCapacity - stderrCapacity - permanentStoragePrefix - store a permanent copy of output at permanentStoragePrefix.stderr and .stdoutReturnValue object.public static ReturnValue waitAndGetReturn(Process p, int stdoutLineCapacity, int stderrLineCapacity, String permanentStoragePrefix)
p - a Process object.stdoutLineCapacity - limit the number of lines stored or set to 0 to store everythingstderrLineCapacity - limit the number of lines stored or set to 0 to store everythingpermanentStoragePrefix - ReturnValue object.public static Process startCommand(Map<String,String> env, String[] command) throws IOException
env - a Map object.command - an array of String objects.Process object.IOException - if any.Copyright © 2015 SeqWare. All rights reserved.