Class FirefoxCookies


  • public final class FirefoxCookies
    extends Object
    Class for reading cookies of Firefox
    • Method Detail

      • getCookiesFromFirefox

        public static List<BrowserCookie> getCookiesFromFirefox​(String domain,
                                                                String[] hosts,
                                                                String[] paths,
                                                                String cookieFile,
                                                                String cookieFilev3)
        Returns cookies from Firefox Because of problems, when two thread are trying to read cookies from firefox 3 at the same time, i had to synchronize this method.
        Parameters:
        domain - Domain
        hosts - Hosts-Array
        paths - Paths-Array
        cookieFile - CookieFile for Firefox Version 1/2
        cookieFilev3 - CookieFile for Firefox Version 3 and higher
        Returns:
        Cookies
      • getCookiesFromFirefox2TextFile

        public static List<BrowserCookie> getCookiesFromFirefox2TextFile​(String cookieFile,
                                                                         String domain,
                                                                         String[] hosts,
                                                                         String[] paths,
                                                                         String browserName)
                                                                  throws IOException
        Reads out the cookies from firefox v2 text file
        Parameters:
        cookieFile - Cookiefile (text)
        domain - Domain
        hosts - Hosts-Array
        paths - Paths-Array
        browserName - Browser Name for Logging
        Returns:
        Cookies
        Throws:
        IOException
      • getPathForFirefox

        public static String getPathForFirefox()
        Returns the path where the cookie-file from Firefox is stored
        Returns:
        Path