Class PlatformUtil
- java.lang.Object
-
- com.github.markusbernhardt.proxy.util.PlatformUtil
-
public class PlatformUtil extends java.lang.ObjectDefines some helper methods to find the correct platform.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPlatformUtil.Browserstatic classPlatformUtil.Desktopstatic classPlatformUtil.Platform
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringOVERRIDE_HOME_DIRstatic java.lang.StringXML_FEATURE_SECURE_PROCESSING
-
Constructor Summary
Constructors Constructor Description PlatformUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlatformUtil.DesktopgetCurrentDesktop()Gets the desktop that we are running on.static PlatformUtil.PlatformgetCurrentPlattform()Gets the platform we are currently running on.static PlatformUtil.BrowsergetDefaultBrowser()Gets the ID for the platform default browser.static java.lang.StringgetUserHomeDir()Gets the user home directory where normally all the settings are stored.private static booleanisGnome()Checks if we are currently running under Gnome desktop.private static booleanisKDE()Checks if we are currently running under KDE desktop.
-
-
-
Field Detail
-
OVERRIDE_HOME_DIR
public static final java.lang.String OVERRIDE_HOME_DIR
- See Also:
- Constant Field Values
-
XML_FEATURE_SECURE_PROCESSING
public static final java.lang.String XML_FEATURE_SECURE_PROCESSING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCurrentPlattform
public static PlatformUtil.Platform getCurrentPlattform()
Gets the platform we are currently running on.- Returns:
- a platform code.
-
getDefaultBrowser
public static PlatformUtil.Browser getDefaultBrowser()
Gets the ID for the platform default browser.- Returns:
- a browser ID, null if no supported browser was detected.
-
getCurrentDesktop
public static PlatformUtil.Desktop getCurrentDesktop()
Gets the desktop that we are running on.- Returns:
- the desktop identifier.
-
isGnome
private static boolean isGnome()
Checks if we are currently running under Gnome desktop.- Returns:
- true if it is a Gnome else false.
-
isKDE
private static boolean isKDE()
Checks if we are currently running under KDE desktop.- Returns:
- true if it is a KDE else false.
-
getUserHomeDir
public static java.lang.String getUserHomeDir()
Gets the user home directory where normally all the settings are stored.- Returns:
- the path to the home directory.
-
-