public class BrowserVersion extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
APP_CODE_NAME
Application code name for both Microsoft Internet Explorer and Netscape series
|
static String |
CPU_CLASS_X86
The X86 CPU class.
|
static BrowserVersion |
FIREFOX_2
Firefox 2
|
static BrowserVersion |
FULL_FEATURED_BROWSER
Deprecated.
please use INTERNET_EXPLORER_7_0
|
static String |
INTERNET_EXPLORER
Application name for the Microsoft Internet Explorer series of browsers
|
static BrowserVersion |
INTERNET_EXPLORER_6_0
Internet Explorer 6
|
static BrowserVersion |
INTERNET_EXPLORER_7_0
Internet Explorer 7
|
static String |
LANGUAGE_ENGLISH_US
United States English language identifier.
|
static BrowserVersion |
MOZILLA_1_0
Deprecated.
please use FIREFOX_2
|
static String |
NETSCAPE
Application name the Netscape navigator series of browsers
|
static BrowserVersion |
NETSCAPE_4_7_9
Deprecated.
please use FIREFOX_2
|
static BrowserVersion |
NETSCAPE_6_2_3
Deprecated.
please use FIREFOX_2
|
static String |
PLATFORM_WIN32
The WIN32 platform.
|
Constructor and Description |
---|
BrowserVersion(String applicationName,
String applicationVersion,
String userAgent,
String javaScriptVersion,
float browserVersionNumeric)
Instantiate one.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getApplicationCodeName()
Return the application code name, for example "Mozilla".
|
String |
getApplicationMinorVersion()
Return the application minor version, for example "0".
|
String |
getApplicationName()
Return the application name, for example "Microsoft Internet Explorer".
|
String |
getApplicationVersion()
Return the application version, for example "4.0 (compatible; MSIE 6.0b; Windows 98)".
|
String |
getBrowserLanguage()
Return the browser application language, for example "en-us".
|
float |
getBrowserVersionNumeric() |
String |
getCpuClass()
Return the type of CPU in the machine, for example "x86".
|
static BrowserVersion |
getDefault()
Returns the default browser version that is used whenever a specific version isn't specified.
|
String |
getJavaScriptVersion()
Return the version of javascript used by the browser, for example "1.2".
|
float |
getJavaScriptVersionNumeric() |
String |
getPlatform()
Return the platform on which the application is running, for example "Win32".
|
Set |
getPlugins()
Gets the configured plugins.
|
String |
getSystemLanguage()
Return the system language, for example "en-us".
|
String |
getUserAgent()
Return the user agent string, for example "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)".
|
String |
getUserLanguage()
Return the user language, for example "en-us".
|
int |
hashCode() |
boolean |
isIE()
Returns true if this BrowserVersion instance represents some
version of Microsoft Internet Explorer.
|
boolean |
isNetscape()
Returns true if this BrowserVersion instance represents some
version of a Netscape browser, including Mozilla and Firefox.
|
boolean |
isOnLine()
Return true if the browser is currently online.
|
void |
setApplicationCodeName(String applicationCodeName) |
void |
setApplicationMinorVersion(String applicationMinorVersion) |
void |
setApplicationName(String applicationName) |
void |
setApplicationVersion(String applicationVersion) |
void |
setBrowserLanguage(String browserLanguage) |
void |
setBrowserVersion(float browserVersion) |
void |
setCpuClass(String cpuClass) |
static void |
setDefault(BrowserVersion newBrowserVersion)
Sets the default browser version that is used whenever a specific version isn't specified.
|
void |
setJavaScriptVersion(String javaScriptVersion) |
void |
setOnLine(boolean onLine) |
void |
setPlatform(String platform) |
void |
setSystemLanguage(String systemLanguage) |
void |
setUserAgent(String userAgent) |
void |
setUserLanguage(String userLanguage) |
public static final String APP_CODE_NAME
public static final String INTERNET_EXPLORER
public static final String NETSCAPE
public static final String LANGUAGE_ENGLISH_US
public static final String CPU_CLASS_X86
public static final String PLATFORM_WIN32
public static final BrowserVersion FULL_FEATURED_BROWSER
public static final BrowserVersion MOZILLA_1_0
public static final BrowserVersion NETSCAPE_4_7_9
public static final BrowserVersion NETSCAPE_6_2_3
public static final BrowserVersion FIREFOX_2
public static final BrowserVersion INTERNET_EXPLORER_6_0
public static final BrowserVersion INTERNET_EXPLORER_7_0
public BrowserVersion(String applicationName, String applicationVersion, String userAgent, String javaScriptVersion, float browserVersionNumeric)
applicationName
- The name of the applicationapplicationVersion
- The version string of the applicationuserAgent
- The user agent string that will be sent to the serverjavaScriptVersion
- The version of JavaScriptbrowserVersionNumeric
- The floating number version of the browserpublic static BrowserVersion getDefault()
INTERNET_EXPLORER_6_0
.public static void setDefault(BrowserVersion newBrowserVersion)
newBrowserVersion
- The new default browser version.public final boolean isIE()
public final boolean isNetscape()
public String getApplicationCodeName()
APP_CODE_NAME
if not explicitly configured.public String getApplicationMinorVersion()
public String getApplicationName()
public String getApplicationVersion()
public String getBrowserLanguage()
LANGUAGE_ENGLISH_US
if not explicitly configured.public String getCpuClass()
CPU_CLASS_X86
if not explicitly configured.public boolean isOnLine()
true
if not explicitly configured.public String getPlatform()
PLATFORM_WIN32
if not explicitly configured.public String getSystemLanguage()
LANGUAGE_ENGLISH_US
if not explicitly configured.public String getUserAgent()
public String getUserLanguage()
LANGUAGE_ENGLISH_US
if not explicitly configured.public String getJavaScriptVersion()
public void setApplicationCodeName(String applicationCodeName)
applicationCodeName
- The applicationCodeName to set.public void setApplicationMinorVersion(String applicationMinorVersion)
applicationMinorVersion
- The applicationMinorVersion to set.public void setApplicationName(String applicationName)
applicationName
- The applicationName to set.public void setApplicationVersion(String applicationVersion)
applicationVersion
- The applicationVersion to set.public void setBrowserLanguage(String browserLanguage)
browserLanguage
- The browserLanguage to set.public void setCpuClass(String cpuClass)
cpuClass
- The cpuClass to set.public void setJavaScriptVersion(String javaScriptVersion)
javaScriptVersion
- The javaScriptVersion to set.public void setOnLine(boolean onLine)
onLine
- The onLine to set.public void setPlatform(String platform)
platform
- The platform to set.public void setSystemLanguage(String systemLanguage)
systemLanguage
- The systemLanguage to set.public void setUserAgent(String userAgent)
userAgent
- The userAgent to set.public void setUserLanguage(String userLanguage)
userLanguage
- The userLanguage to set.public void setBrowserVersion(float browserVersion)
browserVersion
- The browserVersion to set.public float getBrowserVersionNumeric()
public float getJavaScriptVersionNumeric()
public Set getPlugins()
Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.