Class ProcessUtils
- java.lang.Object
-
- com.github.fracpete.processoutput4j.core.ProcessUtils
-
public class ProcessUtils extends java.lang.ObjectHelper class for processes.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.Booleanm_IsAndroidwhether the OS is Android.protected static java.lang.Booleanm_IsLinuxwhether the OS is Linux.protected static java.lang.Booleanm_IsWindowswhether the OS is Windows.
-
Constructor Summary
Constructors Constructor Description ProcessUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddestroy(java.lang.Process process)Destroys the process.static voiddestroy(java.lang.Process process, boolean force)Destroys the process.static booleanisAndroid()Checks whether the operating system is Android.static booleanisLinux()Checks whether the operating system is Linux (but not Android).static booleanisWindows()Checks whether the operating system is Windows.
-
-
-
Method Detail
-
isWindows
public static boolean isWindows()
Checks whether the operating system is Windows.- Returns:
- true if the OS is Windows flavor
-
isAndroid
public static boolean isAndroid()
Checks whether the operating system is Android.- Returns:
- true if the OS is Android flavor
-
isLinux
public static boolean isLinux()
Checks whether the operating system is Linux (but not Android).- Returns:
- true if the OS is Linux flavor (but not Android)
-
destroy
public static void destroy(java.lang.Process process)
Destroys the process. Does not force the exit.- Parameters:
process- the process to destroy
-
destroy
public static void destroy(java.lang.Process process, boolean force)Destroys the process.- Parameters:
process- the process to destroyforce- whether to force the exit without giving the process a chance to clean up
-
-