|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.autonomy.utilities.BrowserSniffer
Interprets information about the internet browser received from the User-Agent request header field generated by browser requests
Field Summary | |
java.lang.String |
m_sUserAgent
|
Constructor Summary | |
BrowserSniffer(javax.servlet.http.HttpServletRequest request)
Constructor. |
|
BrowserSniffer(java.lang.String sUserAgentHeader)
Constructor. |
Method Summary | |
float |
getIEVersion()
Returns the version of Internet Explorer, or -1 if the browser is not Internet Explorer. |
float |
getMozillaCompatibility()
Returns the Mozilla compatibility of the browser of -1 if the request contains no information about the Mozilla compatibility of the browser. |
static java.lang.String |
getUserAgentHeader(javax.servlet.http.HttpServletRequest request)
Gets the user agent header from the HttpServletRequest object. |
boolean |
isBrowserIE()
Returns true if the client browser for this request is Internet Explorer. |
void |
sniff()
Extracts the relevant data from the User-Agent header. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.String m_sUserAgent
Constructor Detail |
public BrowserSniffer(java.lang.String sUserAgentHeader)
sUserAgentHeader
- string containing the contents of the User-Agent header fieldpublic BrowserSniffer(javax.servlet.http.HttpServletRequest request)
request
- instance of a HttpServletRequest object from which the
User-Agent header can be read.Method Detail |
public static java.lang.String getUserAgentHeader(javax.servlet.http.HttpServletRequest request)
request
- object to extract header from.public void sniff() throws java.lang.Exception
java.lang.Exception
public boolean isBrowserIE()
public float getIEVersion()
public float getMozillaCompatibility()
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |