List of utility methods to do Process Read
String | readProcessAsString(Process proc) read Process As String InputStream is = new BufferedInputStream(proc.getInputStream()); StringBuffer fStr = new StringBuffer(); InputStream err = new BufferedInputStream(proc.getErrorStream()); try { BufferedReader reader = new BufferedReader( new InputStreamReader(is)); BufferedReader ereader = new BufferedReader( new InputStreamReader(err)); ... |
ProcessBuilder | makeProcessBulder(Context context, List make Process Bulder List<String> procArgs = new LinkedList<String>(); procArgs.add(getRsyncBinaryPath(context)); procArgs.addAll(args); ProcessBuilder procBld = new ProcessBuilder(procArgs); procBld.redirectErrorStream(true); return procBld; |