| java.lang.Object org.wings.session.Browser
Browser | public class Browser implements Serializable(Code) | | Detect the browser from the user-agent string passed in the HTTP header.
author: Andre Lison |
Constructor Summary | |
public | Browser(String agent) Create a new browser object and start scanning for
browser, os and client language in given string. |
Browser | public Browser(String agent)(Code) | | Create a new browser object and start scanning for
browser, os and client language in given string.
Parameters: agent - the "User-Agent" string from the request. |
detect | protected void detect()(Code) | | That does all the work.
|
getBrowserName | public String getBrowserName()(Code) | | Get the browser browserName (Mozilla, MSIE, Opera etc.).
|
getBrowserType | public BrowserType getBrowserType()(Code) | | Gets the classification of the browser, this can be either GECKO, IE, KONQUEROR, MOZILLA, OPERA or UNKNOWN.
A classification of the browser BrowserType |
getClientLocale | public Locale getClientLocale()(Code) | | Get the browser/client locale.
the found locale or the default server localespecified by Locale.getDefault if not found. |
getMajorVersion | public int getMajorVersion()(Code) | | Get the browser major version.
f.e. the major version for Netscape 6.2 is 6.
the major version or 0 if not found |
getMinorVersion | public double getMinorVersion()(Code) | | Get the minor version. This is the number after the
dot in the version string.
f.e. the minor version for Netscape 6.01 is 0.01.
the minor version if found, 0 otherwise |
getOs | public String getOs()(Code) | | Get the operating system string provided by the browser.
OSType the os browserName or null, if not available. |
getOsVersion | public String getOsVersion()(Code) | | Get the operating system version.
the os version or null, if not available. |
getRelease | public String getRelease()(Code) | | Get additional information about browser version.
f.e. the release for MSIE 6.1b is b.
the release or null, if not available. |
main | public static void main(String[] args)(Code) | | just for testing ...
|
toString | public String toString()(Code) | | Get a full human readable representation of the browser.
|
|
|