com.stericson.RootTools
Class Executer

java.lang.Object
  extended by com.stericson.RootTools.Executer

public class Executer
extends java.lang.Object


Constructor Summary
Executer()
           
 
Method Summary
 java.util.List<java.lang.String> sendShell(java.lang.String[] commands, int sleepTime, IResult result)
          Sends several shell command as su (attempts to)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Executer

public Executer()
Method Detail

sendShell

public java.util.List<java.lang.String> sendShell(java.lang.String[] commands,
                                                  int sleepTime,
                                                  IResult result)
                                           throws java.io.IOException,
                                                  java.lang.InterruptedException,
                                                  RootToolsException
Sends several shell command as su (attempts to)

Parameters:
commands - array of commands to send to the shell
sleepTime - time to sleep between each command, delay.
result - injected result object that implements the Result class
Returns:
a LinkedList containing each line that was returned by the shell after executing or while trying to execute the given commands. You must iterate over this list, it does not allow random access, so no specifying an index of an item you want, not like you're going to know that anyways.
Throws:
java.lang.InterruptedException
java.io.IOException
RootToolsException