Class PlatformUtil
- java.lang.Object
-
- com.github.markusbernhardt.proxy.util.PlatformUtil
-
public class PlatformUtil extends Object
Defines some helper methods to find the correct platform.- Author:
- Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009
-
-
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 StringOVERRIDE_HOME_DIRstatic 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 StringgetUserHomeDir()Gets the user home directory where normally all the settings are stored.
-
-
-
Field Detail
-
OVERRIDE_HOME_DIR
public static final String OVERRIDE_HOME_DIR
- See Also:
- Constant Field Values
-
XML_FEATURE_SECURE_PROCESSING
public static final 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.
-
getUserHomeDir
public static String getUserHomeDir()
Gets the user home directory where normally all the settings are stored.- Returns:
- the path to the home directory.
-
-