|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.session.Browser
public class Browser
Detect the browser from the user-agent string passed in the HTTP header.
| Constructor Summary | |
|---|---|
Browser(String agent)
Create a new browser object and start scanning for browser, os and client language in given string. |
|
| Method Summary | |
|---|---|
protected void |
detect()
That does all the work. |
String |
getBrowserName()
Get the browser browserName (Mozilla, MSIE, Opera etc.). |
BrowserType |
getBrowserType()
Gets the classification of the browser, this can be either GECKO, IE, KONQUEROR, MOZILLA, OPERA or UNKNOWN. |
Locale |
getClientLocale()
Get the browser/client locale. |
int |
getMajorVersion()
Get the browser major version. |
double |
getMinorVersion()
Get the minor version. |
String |
getOs()
Get the operating system string provided by the browser. |
OSType |
getOsType()
Get the operating system type. |
String |
getOsVersion()
Get the operating system version. |
String |
getRelease()
Get additional information about browser version. |
static void |
main(String[] args)
just for testing ... |
String |
toString()
Get a full human readable representation of the browser. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Browser(String agent)
agent - the "User-Agent" string from the request.| Method Detail |
|---|
public String getBrowserName()
public BrowserType getBrowserType()
BrowserTypepublic int getMajorVersion()
public double getMinorVersion()
public String getRelease()
public String getOs()
OSType
public String getOsVersion()
public OSType getOsType()
OSTypepublic Locale getClientLocale()
Locale.getDefault() if not found.protected void detect()
public static void main(String[] args)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||