Class UserAgent

java.lang.Object
com.groiss.gui.UserAgent
All Implemented Interfaces:
Serializable

public class UserAgent extends Object implements Serializable
This class useful for getting information about the user agent (i.e. the browser).
See Also:
  • Constructor Details

    • UserAgent

      public UserAgent()
    • UserAgent

      public UserAgent(String ag)
      Constructor with user agent string.
      Parameters:
      ag - the string of header field User-Agent
    • UserAgent

      public UserAgent(HttpServletRequest req)
      Constructor with servlet request.
      Parameters:
      req -
  • Method Details

    • isMobileReady

      public boolean isMobileReady()
    • isMobileClient

      public boolean isMobileClient()
    • setMobileClient

      public void setMobileClient(boolean mobileClient)
    • isSafari

      public boolean isSafari()
    • isIE

      public boolean isIE()
    • isIE11

      public boolean isIE11()
    • isEdge

      public boolean isEdge()
    • isFirefox

      public boolean isFirefox()
    • getUserAgent

      public static UserAgent getUserAgent(HttpServletRequest req)
      Parameters:
      req -
      Returns:
      the user agent the request is coming from
    • isChrome

      public boolean isChrome()
    • getVersion

      public float getVersion()
    • toString

      public String toString()
      Overrides:
      toString in class Object