## com.cyscape.browserhawk
Interface BrowserInfo

All Superinterfaces:
  java.lang.Cloneable, java.io.Serializable

public interface BrowserInfo
extends java.io.Serializable, java.lang.Cloneable

Interface for accessing the various properties and capabilities of the visiting browser. Implements `Serializable` so a servlet/JSP can place an instance of this class in an HttpSession and have the server persist it to disk.

All these properties are available with BrowserHawk Standard Edition except WinInstallerMinVer which requires BrowserHawk Enterprise Edition.

Method Summary
`java.lang.String` | `applyRules(java.lang.String ruleset)` Applies the given set of rules and returns a String determined by the rules, or the empty string if no rule matches.
`java.lang.Object` | `clone()` Support BrowserInfo cloning
`java.lang.Object` | `get(java.lang.String propertyName)` Returns the value of the property whose name is specified as a String.
`boolean` | `getActiveXControls()` Returns whether the browser supports ActiveX controls
`boolean` | `getAOL()` Returns whether the visitor is accessing your site through an America Online branded browser (on the AOL network)
`double` | `getAOLVersion()` Returns the AOL version number being used.
`int` | `getAuthenticodeUpdate()` Returns the version of Authenticode which the browser supports.
`boolean` | `getBackgroundSounds()` Returns whether the browser supports playing background sounds.
`java.lang.String` | `getBDDDate()` Returns the date (as a String) for when the BDD data file was built, for example "5/1/2002 5:46:11 PM".
`java.lang.String` | `getBDDVersion()` Returns the version of the BDD data file, for example "5.03a".
`boolean` | `getBeta()` Returns whether the browser is a beta version.
`java.lang.String` | `getBrowser()` Returns the common name associated with the browser such as "Netscape" and "IE"
`boolean` | `getCDF()` Returns whether the browser supports Channel Definition Format for "subscribing" to web content with optional auto-updates.
`int` | `getCharHeightAvail()` Returns the number of characters you can fit down the screen of wireless devices without breaks.
`int` | `getCharWidthAvail()` Provides the amount of characters you can fit across the screen of wireless devices without breaks.
`boolean` | `getCompressGZip()` Returns whether the browser accepts compressed content in GZip format.
`java.lang.String` | `getContainerBrowser()` Returns the browser, if any, that surrounds the browsing environment.
`java.lang.String` | `getContainerFullversion()` Returns the full version of the browser, if any, that surrounds the browsing environment.
`double` | `getContainerVersion()` Returns the version of the browser, if any, that surrounds the browsing environment.
`boolean` | `getCookies()` Returns whether the browser supports the ability to accept cookies
`java.lang.String` | `getCountry()` Returns the 2-letter country code for the client.
`boolean` | `getCrawler()` Returns whether the browser is actually a crawler, spider, or other agent used to index a site for searchable content
`boolean` | `getDHTML()` Returns whether the browser supports DHTML script.
`boolean` | `getEmailCrawler()` Returns whether the visiting agent is a crawler designed to scan your site for the purpose of collecting email addresses listed on your site's pages.
`java.lang.String` | `getFileUpload()` Returns "Yes", "Maybe", or "No" to indicate whether the browser supports the ability to have a user upload a file to your server from their browser (whether the browser supports RFC 1867)
`boolean` | `getFontColor()` Returns whether the browser supports the display of different colored text.
`boolean` | `getFontSize()` Returns whether the browser supports the ability to display varying font sizes.
`boolean` | `getFrames()` Returns whether the browser supports frames.
`java.lang.String` | `getFullversion()` Returns the entire version of the browser, including all major and minor numbers and letters, if any.
`boolean` | `getGecko()` Returns whether the client uses the Gecko rendering engine (developed by Mozilla.org).
`java.lang.String` | `getGeckoBuildDate()` Returns the build date of the Gecko rendering engine in the client, or null if none.
`boolean` | `getGold()` Returns whether the browser is a Gold version of the Netscape browsers.
`boolean` | `getHDML()` Returns true if the client device supports HDML (WAP's predecessor).
`boolean` | `getIFrames()` Returns whether the browser supports the IFRAME tag.
`java.lang.String` | `getIPAddr()` Returns the IP address of the visitor.
`boolean` | `getJavaApplets()` Returns whether the browser supports Java applets.
`boolean` | `getJavaScript()` Returns whether the browser supports JavaScript.
`double` | `getJavaScriptVer()` Returns the version of JavaScript that the browser supports.
`java.lang.String` | `getLanguage()` Returns the most likely preference for the visitor's spoken language.
`int` | `getMajorver()` Returns the major version of the browser.
`double` | `getMinorver()` Returns the minor version of the browser.
`java.lang.String` | `getMinorverlet()` Returns the minor version letter of the browser, if any.
`boolean` | `getMouseOver()` Returns whether the browser supports the ability to use JavaScript mouse-over effects.
`boolean` | `getMSN()` Returns whether the user is on the MSN network.
`boolean` | `getNETCLRInstalled()` Returns whether the .NET CLR is installed on the client.
`java.lang.String` | `getNETCLRVersion()` Returns the version of the .NET CLR installed on the client, or null if none or information not available.
`java.lang.String` | `getOSDetails()` Returns details on operating system the visitor is using.
`boolean` | `getPDA()` Returns true if the client is a PDA device such as a Palm Pilot
`java.lang.String` | `getPlatform()` Returns more general information (as compared to getOSDetails()) about the user's platform.
`boolean` | `getPNG()` Returns whether the browser supports the Portable Network Graphic (PNG) image file format.
`boolean` | `getProxy()` Returns whether the user is connecting through a proxy server.
`java.lang.String` | `getProxyString()` Returns the name of the proxy or proxies that acted on this request when that information is available, or the empty string if none.
`java.lang.String` | `getResolveIP()` Returns the hostname of the client making the web request, as a String, or null if it cannot be determined for any reason.
`boolean` | `getSSL()` Returns whether the browser supports the Secure Sockets Layer (SSL) protocol
`boolean` | `getSSLActive()` Returns whether the user is connected through an active SSL connection.
`java.lang.String` | `getSSLCipherSuite()` Returns the SSL cipher suite used for this SSL session; only available if the user is connected through an active SSL connection.
`int` | `getSSLKeySize()` Returns the SSL key size that the browser supports; only available if the user is connected through an active SSL connection.
`boolean` | `getStyleSheets()` Returns whether the browser supports cascading style sheets (CSS).
`boolean` | `getTableBGColor()` Returns whether the browser supports the ability to control the color of individual HTML table cells.
`boolean` | `getTableBGImage()` Returns whether the browser supports the ability to display an image in the background of individual HTML table cells.
`boolean` | `getTables()` Returns whether the browser supports the ability display HTML tables.
`boolean` | `getVBScript()` Returns whether the browser supports VBScript.
`double` | `getVersion()` Returns the version of the browser.
`boolean` | `getWAP()` Returns true for devices that support WML and WAP (Wireless Application Protocol), such as wireless phones.
`java.lang.String` | `getWAPDeviceModel()` Contains the model of the WAP device if known, or "Unknown" if not.
`java.lang.String` | `getWAPGateway()` Shows details of the UP.Link gateway if being used.
`int` | `getWAPMaxDeckSize()` Contains the approximate maximum number of bytes that the wireless device will support in a deck.
`java.lang.String` | `getWAPSubscriberID()` Automatically set to the unqiue subscriber ID of the WAP visitor when available.
`boolean` | `getWin16()` Returns whether the browser is running on a 16 bit Windows operating system, such as Windows 3.1.
`double` | `getWinInstallerMinVer()` Returns the minimum version of the Windows Installer that is installed on the client.
`boolean` | `getXML()` Returns whether the browser supports direct XML display.
`boolean` | `getXMLHttpRequest()` Returns whether this client supports the XMLHttpRequest object used for AJAX interactions.
`java.lang.String` | `toXML()` Returns an XML representation of all the BrowserInfo properties and their associated values.
`java.lang.String` | `toXML(java.util.Properties props)` Returns an XML representation of all the BrowserInfo properties and their associated values.

Method Detail

### clone

    public java.lang.Object clone()

  Support BrowserInfo cloning

### getActiveXControls

    public boolean getActiveXControls()

  Returns whether the browser supports ActiveX controls

### getAOL

    public boolean getAOL()

  Returns whether the visitor is accessing your site through an America Online branded browser (on the AOL network)

### getAOLVersion

    public double getAOLVersion()

  Returns the AOL version number being used. Otherwise it returns 0.

### getAuthenticodeUpdate

    public int getAuthenticodeUpdate()

  Returns the version of Authenticode which the browser supports. Authenticode is a Microsoft technology for digitally signing code.

### getBackgroundSounds

    public boolean getBackgroundSounds()

  Returns whether the browser supports playing background sounds.

### getBeta

    public boolean getBeta()

  Returns whether the browser is a beta version.

### getBrowser

    public java.lang.String getBrowser()

  Returns the common name associated with the browser such as "Netscape" and "IE"

### getCDF

    public boolean getCDF()

  Returns whether the browser supports Channel Definition Format for "subscribing" to web content with optional auto-updates.

### getCharHeightAvail

    public int getCharHeightAvail()

  Returns the number of characters you can fit down the screen of wireless devices without breaks. Note that this number is based on Western character sets which take up only half that of other character sets. If displaying data in Japanese, for example, you can display twice as many characters as reported. Currently this property is set only for DoCoMo i-mode devices and support for other devices will be added shortly.

### getCharWidthAvail

    public int getCharWidthAvail()

  Provides the amount of characters you can fit across the screen of wireless devices without breaks. Note that this number is based on Western character sets which take up only half that of other character sets. If displaying data in Japanese, for example, you can display twice as many characters as reported. Currently this property is set only for DoCoMo i-mode devices and support for other devices will be added shortly.

### getCookies

    public boolean getCookies()

  Returns whether the browser supports the ability to accept cookies

### getCompressGZip

    public boolean getCompressGZip()

  Returns whether the browser accepts compressed content in GZip format. If so your pages can be compressed on the fly to optimize download times.

### getCrawler

    public boolean getCrawler()

  Returns whether the browser is actually a crawler, spider, or other agent used to index a site for searchable content

### getDHTML

    public boolean getDHTML()

  Returns whether the browser supports DHTML script. Typically used in conjunction with getBrowser() and getMajorver().

### getFileUpload

    public java.lang.String getFileUpload()

  Returns "Yes", "Maybe", or "No" to indicate whether the browser supports the ability to have a user upload a file to your server from their browser (whether the browser supports RFC 1867)

### getFontColor

    public boolean getFontColor()

  Returns whether the browser supports the display of different colored text.

### getFontSize

    public boolean getFontSize()

  Returns whether the browser supports the ability to display varying font sizes.

### getFrames

    public boolean getFrames()

  Returns whether the browser supports frames.

### getFullversion

    public java.lang.String getFullversion()

  Returns the entire version of the browser, including all major and minor numbers and letters, if any. Example: 4.01.03a. Also see getMajorver(), getMinorver(), and getVersion().

### getGold

    public boolean getGold()

  Returns whether the browser is a Gold version of the Netscape browsers.

### getHDML

    public boolean getHDML()

  Returns true if the client device supports HDML (WAP's predecessor).

### getIPAddr

    public java.lang.String getIPAddr()

  Returns the IP address of the visitor.

### getJavaApplets

    public boolean getJavaApplets()

  Returns whether the browser supports Java applets.

### getJavaScript

    public boolean getJavaScript()

  Returns whether the browser supports JavaScript.

### getJavaScriptVer

    public double getJavaScriptVer()

  Returns the version of JavaScript that the browser supports.

### getLanguage

    public java.lang.String getLanguage()

  Returns the most likely preference for the visitor's spoken language.

### getMajorver

    public int getMajorver()

  Returns the major version of the browser. Example: For Netscape 4.05 getMajorver() returns 4. Also see getMinorver(), getVersion(), and getFullversion().

### getMinorver

    public double getMinorver()

  Returns the minor version of the browser. Example: For Netscape 4.05 getMinorver() returns 0.05. Also see getMajorver(), getVersion(), and getFullversion().

### getMinorverlet

    public java.lang.String getMinorverlet()

  Returns the minor version letter of the browser, if any. Returns the empty string if none. Example: For Netscape 4.05C getMinorverlet() returns "C". Also see getMajorver(), getMinorver(), getVersion(), and getFullversion().

### getMouseOver

    public boolean getMouseOver()

  Returns whether the browser supports the ability to use JavaScript mouse-over effects.

### getMSN

    public boolean getMSN()

  Returns whether the user is on the MSN network.

### getOSDetails

    public java.lang.String getOSDetails()

  Returns details on operating system the visitor is using. For example Sun, Microsoft, Linux, BSD.

### getPlatform

    public java.lang.String getPlatform()

  Returns more general information (as compared to getOSDetails()) about the user's platform. For example UNIX, Win98, MacPPC, WinNT

### getPDA

    public boolean getPDA()

  Returns true if the client is a PDA device such as a Palm Pilot

### getPNG

    public boolean getPNG()

  Returns whether the browser supports the Portable Network Graphic (PNG) image file format.

### getProxy

    public boolean getProxy()

  Returns whether the user is connecting through a proxy server. Note: Not all connections through a proxy can be detected as such.

### getSSL

    public boolean getSSL()

  Returns whether the browser supports the Secure Sockets Layer (SSL) protocol

### getSSLActive

    public boolean getSSLActive()

  Returns whether the user is connected through an active SSL connection. Note: Detection of this capability is not available on all web servers.

### getSSLCipherSuite

    public java.lang.String getSSLCipherSuite()

  Returns the SSL cipher suite used for this SSL session; only available if the user is connected through an active SSL connection. For example, SSL_RSA_WITH_RC4_128_MD5. Note: Detection of this capability is not available on all web servers. Returns "Unknown" if not determinable.

### getSSLKeySize

    public int getSSLKeySize()

  Returns the SSL key size that the browser supports; only available if the user is connected through an active SSL connection. For example, 40 or 128. Note: Detection of this capability is not available on all web servers. It's required for servers that support Servlet API 2.3 and up, but not all are conformant. Returns -1 if the cipher suite is unrecognized. Returns 0 if no SSL information can be found. The ExtendedBrowserInfo.getSSLKeySize() property provides another mechanism to test this value when the servlet engine doesn't support SSL reporting.

### getStyleSheets

    public boolean getStyleSheets()

  Returns whether the browser supports cascading style sheets (CSS).

### getTableBGColor

    public boolean getTableBGColor()

  Returns whether the browser supports the ability to control the color of individual HTML table cells.

### getTableBGImage

    public boolean getTableBGImage()

  Returns whether the browser supports the ability to display an image in the background of individual HTML table cells.

### getTables

    public boolean getTables()

  Returns whether the browser supports the ability display HTML tables.

### getVBScript

    public boolean getVBScript()

  Returns whether the browser supports VBScript.

### getVersion

    public double getVersion()

  Returns the version of the browser. Example: For Netscape 4.05 getVersion() returns 4.05. Also see getMajorver(), getMinorver(), and getFullversion().

### getWAP

    public boolean getWAP()

  Returns true for devices that support WML and WAP (Wireless Application Protocol), such as wireless phones. For example most modern wireless Internet phones use WML instead of HTML.

### getWAPDeviceModel

    public java.lang.String getWAPDeviceModel()

  Contains the model of the WAP device if known, or "Unknown" if not. For example, the Ericsson R380 would be set to "R380".

### getWAPGateway

    public java.lang.String getWAPGateway()

  Shows details of the UP.Link gateway if being used. For example "up1.upl.sprintpcs.com". Returns the empty string if none.

### getWAPMaxDeckSize

    public int getWAPMaxDeckSize()

  Contains the approximate maximum number of bytes that the wireless device will support in a deck.

### getWAPSubscriberID

    public java.lang.String getWAPSubscriberID()

  Automatically set to the unqiue subscriber ID of the WAP visitor when available. Currently requires visitor to be using UP.Link gateway.

### getWin16

    public boolean getWin16()

  Returns whether the browser is running on a 16 bit Windows operating system, such as Windows 3.1.

### getXML

    public boolean getXML()

  Returns whether the browser supports direct XML display.

### getEmailCrawler

    public boolean getEmailCrawler()

  Returns whether the visiting agent is a crawler designed to scan your site for the purpose of collecting email addresses listed on your site's pages.

### getIFrames

    public boolean getIFrames()

  Returns whether the browser supports the IFRAME tag.

### applyRules

    public java.lang.String applyRules(java.lang.String ruleset)

  Applies the given set of rules and returns a String determined by the rules, or the empty string if no rule matches. This feature is only supported in the Enterprise version of the software. Other versions always return null.

### getResolveIP

    public java.lang.String getResolveIP()

  Returns the hostname of the client making the web request, as a String, or null if it cannot be determined for any reason. For example, "daedalus.client.com". Attempts are made to use cached results whenever possible.

### getBDDVersion

    public java.lang.String getBDDVersion()

  Returns the version of the BDD data file, for example "5.03a". The value is null if version information is not available.

### getBDDDate

    public java.lang.String getBDDDate()

  Returns the date (as a String) for when the BDD data file was built, for example "5/1/2002 5:46:11 PM". The date and time are displayed as appropriate for the locale in which the BDD data file was built, which for official data files is always the US (mm/dd/yyyy). With user-built BDD data files the locale and date string may be different. The value is null if date information is not available.

### getNETCLRInstalled

    public boolean getNETCLRInstalled()

  Returns whether the .NET CLR is installed on the client.

### getNETCLRVersion

    public java.lang.String getNETCLRVersion()

  Returns the version of the .NET CLR installed on the client, or null if none or information not available. Currently requires IE 6 and up..

### getGecko

    public boolean getGecko()

  Returns whether the client uses the Gecko rendering engine (developed by Mozilla.org).

### getGeckoBuildDate

    public java.lang.String getGeckoBuildDate()

  Returns the build date of the Gecko rendering engine in the client, or null if none.

### getProxyString

    public java.lang.String getProxyString()

  Returns the name of the proxy or proxies that acted on this request when that information is available, or the empty string if none.

### getWinInstallerMinVer

    public double getWinInstallerMinVer()

  Returns the minimum version of the Windows Installer that is installed on the client. While it is not possible to determine if they have a later version, it is possible to deduce what the minimum version they must have installed is.

  Requires BrowserHawk Enterprise Edition.

### getCountry

    public java.lang.String getCountry()

  Returns the 2-letter country code for the client. This is a convenience method that in order to work requires CountryHawk be installed and available on the system. If CountryHawk is not installed, this method will throw a BrowserHawkException. If CountryHawk is misconfigured, this method will throw a CountryException.

### getContainerBrowser

    public java.lang.String getContainerBrowser()

  Returns the browser, if any, that surrounds the browsing environment. For example, Netscape 8 can "wrap" the Internet Explorer rendering engine. BrowserHawk will in this case return IE-related values for getBrowser(), getVersion(), and getFullversion() because those values matter most in choosing how to interact with the client. The getContainerBrowser() method allow the fetching of the container or "wrapper" browser, such as "Netscape" in the above example. Returns null if there's no container browser.

  This property on BrowserInfo can detect container browsers when identifying tokens are placed in the User-Agent sent from the client, such as when Netscape 8 or the AOL Browser wrap IE 6. The property by the same name on ExtendedBrowserInfo can detect these and additionally detect browser wrappings that require client-side JavaScript execution for detection such as when the Windows Media Player wraps IE 6.

### getContainerVersion

    public double getContainerVersion()

  Returns the version of the browser, if any, that surrounds the browsing environment. For example, Netscape 8 can "wrap" the Internet Explorer rendering engine. BrowserHawk will in this case return IE-related values for getBrowser(), getVersion(), and getFullversion() because those values matter most in choosing how to interact with the client. The getContainerVersion() method allow the fetching of the container or "wrapper" browser version, such as "8.0" in the above example. Returns 0.0 if there's no container browser.

  This property on BrowserInfo can detect container browsers when identifying tokens are placed in the User-Agent sent from the client, such as when Netscape 8 or the AOL Browser wrap IE 6. The property by the same name on ExtendedBrowserInfo can detect these and additionally detect browser wrappings that require client-side JavaScript execution for detection such as when the Windows Media Player wraps IE 6.

### getContainerFullversion

    public java.lang.String getContainerFullversion()

  Returns the full version of the browser, if any, that surrounds the browsing environment. For example, Netscape 8 can "wrap" the Internet Explorer rendering engine. BrowserHawk will in this case return IE-related values for getBrowser(), getVersion(), and getFullversion() because those values matter most in choosing how to interact with the client. The getContainerVersion() method allow the fetching of the container or "wrapper" browser version, such as "8.0.1" in the above example. Returns null if there's no container browser.

  This property on BrowserInfo can detect container browsers when identifying tokens are placed in the User-Agent sent from the client, such as when Netscape 8 or the AOL Browser wrap IE 6. The property by the same name on ExtendedBrowserInfo can detect these and additionally detect browser wrappings that require client-side JavaScript execution for detection such as when the Windows Media Player wraps IE 6.

### getXMLHttpRequest

    public boolean getXMLHttpRequest()

  Returns whether this client supports the XMLHttpRequest object used for AJAX interactions.

### toXML

    public java.lang.String toXML()

  Returns an XML representation of all the BrowserInfo properties and their associated values. The root element includes metadata about the capture including the BrowserHawk version, license level installed, edition, BDD version, and timestamp in the ISO 8601 format. See also `ExtendedBrowserInfo.toXML()` and `BrowserHawk.toXML(BrowserInfo, ExtendedBrowserInfo)`.

### toXML

    public java.lang.String toXML(java.util.Properties props)

  Returns an XML representation of all the BrowserInfo properties and their associated values. The root element includes metadata about the capture including the BrowserHawk version, license level installed, edition, BDD version, and timestamp in the ISO 8601 format. By passing a Properties object you can add additional attributes on the root, for example a user's login ID or department. It's left to the caller to ensure each key is a valid XML attribute name. See also `ExtendedBrowserInfo.toXML()` and `BrowserHawk.toXML(BrowserInfo, ExtendedBrowserInfo)`.

### get

    public java.lang.Object get(java.lang.String propertyName)

  Returns the value of the property whose name is specified as a String. The name is case sensitive. The value returned may be of type String, Integer, Double, or Boolean. For example, to retrieve the ContainerVersion, you call

      Double d = (Double) info.get("ContainerVersion")

  .