Class PlatformUtil
java.lang.Object
com.github.markusbernhardt.proxy.util.PlatformUtil
Defines some helper methods to find the correct platform.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
static enum
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PlatformUtil.Desktop
Gets the desktop that we are running on.static PlatformUtil.Platform
Gets the platform we are currently running on.static PlatformUtil.Browser
Gets the ID for the platform default browser.static String
Gets the user home directory where normally all the settings are stored.private static boolean
isGnome()
Checks if we are currently running under Gnome desktop.private static boolean
isKDE()
Checks if we are currently running under KDE desktop.
-
Field Details
-
OVERRIDE_HOME_DIR
- See Also:
-
XML_FEATURE_SECURE_PROCESSING
- See Also:
-
-
Constructor Details
-
PlatformUtil
public PlatformUtil()
-
-
Method Details
-
getCurrentPlattform
Gets the platform we are currently running on.- Returns:
- a platform code.
-
getDefaultBrowser
Gets the ID for the platform default browser.- Returns:
- a browser ID, null if no supported browser was detected.
-
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
Gets the user home directory where normally all the settings are stored.- Returns:
- the path to the home directory.
-