Class ClientBrowserUtil


  • public class ClientBrowserUtil
    extends Object
    • Field Detail

      • MOZILLA

        public static final Pattern MOZILLA
      • MOZILLA_LIKE

        public static final Pattern MOZILLA_LIKE
      • CHROME

        public static final Pattern CHROME
      • MSIE

        public static final Pattern MSIE
      • MICROSOFT

        public static final Pattern MICROSOFT
      • OPERA

        public static final Pattern OPERA
      • SAFARI

        public static final Pattern SAFARI
      • KONQUEROR

        public static final Pattern KONQUEROR
      • LINUX

        public static final Pattern LINUX
      • WINDOWS

        public static final Pattern WINDOWS
      • MAC

        public static final Pattern MAC
      • FREEBSD

        public static final Pattern FREEBSD
      • UNIX

        public static final Pattern UNIX
    • Method Detail

      • isWindows

        public static boolean isWindows​(javax.servlet.http.HttpServletRequest request)
        Returns true if the user-agent indicates Windows.
        Parameters:
        request -
        Returns:
        true if the user-agent indicates Windows.
      • isWindows

        public static boolean isWindows​(String userAgent)
        Returns true if the user-agent indicates Windows.
        Parameters:
        userAgent - the request User-Agent header.
        Returns:
        true if the user-agent indicates Windows.
      • isMacintosh

        public static boolean isMacintosh​(javax.servlet.http.HttpServletRequest request)
        Returns true if the user-agent indicates MacOSX.
        Parameters:
        request -
        Returns:
        true if the user-agent indicates MacOSX.
      • isMacintosh

        public static boolean isMacintosh​(String userAgent)
        Returns true if the user-agent indicates MacOSX.
        Parameters:
        userAgent - the request User-Agent header.
        Returns:
        true if the user-agent indicates MacOSX.
      • isUnix

        public static boolean isUnix​(javax.servlet.http.HttpServletRequest request)
        Returns true if the user-agent indicates Unix.
        Parameters:
        request -
        Returns:
        true if the user-agent indicates Unix.
      • isUnix

        public static boolean isUnix​(String userAgent)
        Returns true if the user-agent indicates Unix.
        Parameters:
        userAgent - the request User-Agent header.
        Returns:
        true if the user-agent indicates Unix.
      • isFirefox

        public static boolean isFirefox​(javax.servlet.http.HttpServletRequest request)
        Returns true if the user-agent indicates a Firefox browser.
        Parameters:
        request -
        Returns:
        true if the user-agent indicates a Firefox browser..
      • isFirefox

        public static boolean isFirefox​(String userAgent)
        Returns true if the user-agent indicates a Firefox browser.
        Parameters:
        userAgent - the request User-Agent header.
        Returns:
        true if the user-agent indicates a Firefox browser..
      • isSafari

        public static boolean isSafari​(javax.servlet.http.HttpServletRequest request)
        Returns true if the user-agent indicates a Safari browser.
        Parameters:
        request -
        Returns:
        true if the user-agent indicates a Safari browser..
      • isSafari

        public static boolean isSafari​(String userAgent)
        Returns true if the user-agent indicates a Safari browser.
        Parameters:
        userAgent - the request User-Agent header.
        Returns:
        true if the user-agent indicates a Safari browser..
      • isChrome

        public static boolean isChrome​(javax.servlet.http.HttpServletRequest request)
        Parameters:
        request -
        Returns:
      • isChrome

        public static boolean isChrome​(String userAgent)
        Parameters:
        userAgent -
        Returns:
      • isOpera

        public static boolean isOpera​(javax.servlet.http.HttpServletRequest request)
        Parameters:
        request -
        Returns:
      • isOpera

        public static boolean isOpera​(String userAgent)
        Parameters:
        userAgent -
        Returns:
      • isInternetExplorer

        public static boolean isInternetExplorer​(javax.servlet.http.HttpServletRequest request)
        Parameters:
        request -
        Returns:
      • isInternetExplorer

        public static boolean isInternetExplorer​(String userAgent)
        Parameters:
        userAgent -
        Returns:
      • isKonqueror

        public static boolean isKonqueror​(javax.servlet.http.HttpServletRequest request)
        Parameters:
        request -
        Returns:
      • isKonqueror

        public static boolean isKonqueror​(String userAgent)
        Parameters:
        userAgent -
        Returns:
      • getUserAgent

        public static String getUserAgent​(javax.servlet.http.HttpServletRequest request)
        Parameters:
        request -
        Returns:
      • rfc2047EncodeFilename

        public static String rfc2047EncodeFilename​(javax.servlet.http.HttpServletRequest request,
                                                   String filename)
        Parameters:
        request -
        filename -
        Returns:
      • rfc2047EncodeFilename

        public static String rfc2047EncodeFilename​(String userAgent,
                                                   String filename)
        Parameters:
        userAgent -
        filename -
        Returns: