nl.bitwalker.useragentutils
Enum Browser

java.lang.Object
  extended by java.lang.Enum<Browser>
      extended by nl.bitwalker.useragentutils.Browser
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Browser>

public enum Browser
extends java.lang.Enum<Browser>

Enum constants for most common browsers, including e-mail clients and bots.

Author:
harald

Enum Constant Summary
APPLE_MAIL
           
BOT
           
CAMINO
           
CAMINO2
           
CFNETWORK
           
CHROME
          Google Chrome browser
CHROME10
           
CHROME8
           
CHROME9
           
DOWNLOAD
           
EUDORA
           
EVOLUTION
           
FIREFOX
           
FIREFOX1_5
           
FIREFOX2
           
FIREFOX3
           
FIREFOX3MOBILE
           
FIREFOX4
           
FLOCK
           
IE
          Family of Internet Explorer browsers
IE5
           
IE5_5
           
IE6
           
IE7
           
IE8
           
IE9
           
IEMOBILE6
           
IEMOBILE7
          Since 2007 the mobile edition of Internet Explorer identifies itself as IEMobile in the user-agent.
KONQUEROR
           
LOTUS_NOTES
           
LYNX
           
MOBILE_SAFARI
           
MOZILLA
           
NETFRONT
           
OMNIWEB
           
OPERA
           
OPERA_MINI
           
OPERA10
          For some strange reason Opera uses 9.80 in the user-agent string.
OPERA9
           
OUTLOOK
          Outlook email client
OUTLOOK_EXPRESS7
          Since version 7 Outlook Express is identifying itself.
OUTLOOK2007
          Microsoft Outlook 2007 identifies itself as MSIE7 but uses the html rendering engine of Word 2007.
OUTLOOK2010
          Outlook 2010 is still using the rendering engine of Word. http://www.fixoutlook.org
POCOMAIL
           
SAFARI
           
SAFARI4
           
SAFARI5
           
SEAMONKEY
           
THEBAT
           
THUNDERBIRD
           
THUNDERBIRD2
           
THUNDERBIRD3
           
UNKNOWN
           
 
Method Summary
 BrowserType getBrowserType()
           
 Browser getGroup()
           
 short getId()
           
 Manufacturer getManufacturer()
           
 java.lang.String getName()
           
 RenderingEngine getRenderingEngine()
           
 Version getVersion(java.lang.String userAgentString)
          Detects the detailed version information of the browser.
 boolean isInUserAgentString(java.lang.String agentString)
           
static Browser parseUserAgentString(java.lang.String agentString)
          Iterates over all Browsers to compare the browser signature with the user agent string.
static Browser valueOf(short id)
          Returns the enum constant of this type with the specified id.
static Browser valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Browser[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OPERA

public static final Browser OPERA

OPERA_MINI

public static final Browser OPERA_MINI

OPERA10

public static final Browser OPERA10
For some strange reason Opera uses 9.80 in the user-agent string.


OPERA9

public static final Browser OPERA9

KONQUEROR

public static final Browser KONQUEROR

OUTLOOK

public static final Browser OUTLOOK
Outlook email client


OUTLOOK2007

public static final Browser OUTLOOK2007
Microsoft Outlook 2007 identifies itself as MSIE7 but uses the html rendering engine of Word 2007. Example user agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322; MSOffice 12)


OUTLOOK2010

public static final Browser OUTLOOK2010
Outlook 2010 is still using the rendering engine of Word. http://www.fixoutlook.org


IE

public static final Browser IE
Family of Internet Explorer browsers


OUTLOOK_EXPRESS7

public static final Browser OUTLOOK_EXPRESS7
Since version 7 Outlook Express is identifying itself. By detecting Outlook Express we can not identify the Internet Explorer version which is probably used for the rendering. Obviously this product is now called Windows Live Mail Desktop or just Windows Live Mail.


IEMOBILE7

public static final Browser IEMOBILE7
Since 2007 the mobile edition of Internet Explorer identifies itself as IEMobile in the user-agent. If previous versions have to be detected, use the operating system information as well.


IEMOBILE6

public static final Browser IEMOBILE6

IE9

public static final Browser IE9

IE8

public static final Browser IE8

IE7

public static final Browser IE7

IE6

public static final Browser IE6

IE5_5

public static final Browser IE5_5

IE5

public static final Browser IE5

CHROME

public static final Browser CHROME
Google Chrome browser


CHROME10

public static final Browser CHROME10

CHROME9

public static final Browser CHROME9

CHROME8

public static final Browser CHROME8

OMNIWEB

public static final Browser OMNIWEB

SAFARI

public static final Browser SAFARI

SAFARI5

public static final Browser SAFARI5

MOBILE_SAFARI

public static final Browser MOBILE_SAFARI

SAFARI4

public static final Browser SAFARI4

APPLE_MAIL

public static final Browser APPLE_MAIL

LOTUS_NOTES

public static final Browser LOTUS_NOTES

THUNDERBIRD

public static final Browser THUNDERBIRD

THUNDERBIRD3

public static final Browser THUNDERBIRD3

THUNDERBIRD2

public static final Browser THUNDERBIRD2

CAMINO

public static final Browser CAMINO

CAMINO2

public static final Browser CAMINO2

FLOCK

public static final Browser FLOCK

FIREFOX

public static final Browser FIREFOX

FIREFOX3MOBILE

public static final Browser FIREFOX3MOBILE

FIREFOX4

public static final Browser FIREFOX4

FIREFOX3

public static final Browser FIREFOX3

FIREFOX2

public static final Browser FIREFOX2

FIREFOX1_5

public static final Browser FIREFOX1_5

SEAMONKEY

public static final Browser SEAMONKEY

BOT

public static final Browser BOT

MOZILLA

public static final Browser MOZILLA

CFNETWORK

public static final Browser CFNETWORK

EUDORA

public static final Browser EUDORA

POCOMAIL

public static final Browser POCOMAIL

THEBAT

public static final Browser THEBAT

NETFRONT

public static final Browser NETFRONT

EVOLUTION

public static final Browser EVOLUTION

LYNX

public static final Browser LYNX

DOWNLOAD

public static final Browser DOWNLOAD

UNKNOWN

public static final Browser UNKNOWN
Method Detail

values

public static Browser[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Browser c : Browser.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Browser valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getId

public short getId()

getName

public java.lang.String getName()

getVersion

public Version getVersion(java.lang.String userAgentString)
Detects the detailed version information of the browser. Depends on the userAgent to be available. Returns null if it can not detect the version information.

Returns:
Version

getBrowserType

public BrowserType getBrowserType()
Returns:
the browserType

getManufacturer

public Manufacturer getManufacturer()
Returns:
the manufacturer

getRenderingEngine

public RenderingEngine getRenderingEngine()
Returns:
the rendering engine

getGroup

public Browser getGroup()
Returns:
top level browser family

isInUserAgentString

public boolean isInUserAgentString(java.lang.String agentString)

parseUserAgentString

public static Browser parseUserAgentString(java.lang.String agentString)
Iterates over all Browsers to compare the browser signature with the user agent string. If no match can be found Browser.UNKNOWN will be returned.

Parameters:
agentString -
Returns:
Browser

valueOf

public static Browser valueOf(short id)
Returns the enum constant of this type with the specified id. Throws IllegalArgumentException if the value does not exist.

Parameters:
id -
Returns:


Copyright © 2011. All Rights Reserved.