Class FirefoxCookies
- java.lang.Object
-
- ch.supertomcat.supertomcatutils.http.cookies.firefox.FirefoxCookies
-
public final class FirefoxCookies extends Object
Class for reading cookies of Firefox
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.static List<BrowserCookie>getCookiesFromFirefox2TextFile(String cookieFile, String domain, String[] hosts, String[] paths, String browserName)Reads out the cookies from firefox v2 text filestatic List<BrowserCookie>getCookiesFromFirefox3Sqlite(String cookieFilev3, String domain, String[] hosts, String[] paths, Object dbLockObject, String browserName)Reads out the cookies from firefox v3 sqlite filestatic StringgetPathForFirefox()Returns the path where the cookie-file from Firefox is stored
-
-
-
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- Domainhosts- Hosts-Arraypaths- Paths-ArraycookieFile- CookieFile for Firefox Version 1/2cookieFilev3- 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- Domainhosts- Hosts-Arraypaths- Paths-ArraybrowserName- Browser Name for Logging- Returns:
- Cookies
- Throws:
IOException
-
getCookiesFromFirefox3Sqlite
public static List<BrowserCookie> getCookiesFromFirefox3Sqlite(String cookieFilev3, String domain, String[] hosts, String[] paths, Object dbLockObject, String browserName) throws ClassNotFoundException, SQLException
Reads out the cookies from firefox v3 sqlite file- Parameters:
cookieFilev3- Cookiefile (sqlite)domain- Domainhosts- Hosts-Arraypaths- Paths-ArraydbLockObject- Lock Object for reading databasebrowserName- Browser Name for Logging- Returns:
- Cookies
- Throws:
ClassNotFoundExceptionSQLException
-
getPathForFirefox
public static String getPathForFirefox()
Returns the path where the cookie-file from Firefox is stored- Returns:
- Path
-
-