public class ProcessUtils extends Object
| Constructor and Description | 
|---|
| ProcessUtils() | 
| Modifier and Type | Method and Description | 
|---|---|
| static String | escapeCommandLine(String arg)This should correctly put double-quotes around an argument if
 ProcessBuilder doesn't seem to work (as it doesn't
 on paths with spaces on Windows) | 
| static FileProcessResult | execute(ProcessBuilder pb,
       long timeoutMillis,
       int maxStdoutBuffer,
       int maxStdErrBuffer)This writes stdout and stderr to the FileProcessResult. | 
| static FileProcessResult | execute(ProcessBuilder pb,
       long timeoutMillis,
       Path stdoutRedirect,
       int maxStdErrBuffer)This redirects stdout to stdoutRedirect path. | 
| static String | unescapeCommandLine(String arg) | 
public static String escapeCommandLine(String arg)
arg - public static FileProcessResult execute(ProcessBuilder pb, long timeoutMillis, int maxStdoutBuffer, int maxStdErrBuffer) throws IOException
pb - timeoutMillis - maxStdoutBuffer - maxStdErrBuffer - IOExceptionpublic static FileProcessResult execute(ProcessBuilder pb, long timeoutMillis, Path stdoutRedirect, int maxStdErrBuffer) throws IOException
pb - timeoutMillis - stdoutRedirect - maxStdErrBuffer - IOExceptionCopyright © 2007–2022 The Apache Software Foundation. All rights reserved.