Class PlatformUtil
- java.lang.Object
-
- com.github.markusbernhardt.proxy.util.PlatformUtil
-
public class PlatformUtil extends java.lang.Object
Defines some helper methods to find the correct platform.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlatformUtil.Browser
static class
PlatformUtil.Desktop
static class
PlatformUtil.Platform
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OVERRIDE_HOME_DIR
static java.lang.String
XML_FEATURE_SECURE_PROCESSING
-
Constructor Summary
Constructors Constructor Description PlatformUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlatformUtil.Desktop
getCurrentDesktop()
Gets the desktop that we are running on.static PlatformUtil.Platform
getCurrentPlattform()
Gets the platform we are currently running on.static PlatformUtil.Browser
getDefaultBrowser()
Gets the ID for the platform default browser.static java.lang.String
getUserHomeDir()
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 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.
-
-