Class FirefoxPreferencesParser
java.lang.Object
net.sourceforge.jnlp.proxy.browser.FirefoxPreferencesParser
A parser for Firefox's preferences file. It can 'parse' Firefox's preferences file and expose the preferences in a simple to use format.
Sample usage:
FirefoxPreferencesParser p = new FirefoxPreferencesParser(prefsFile);
p.parse();
Map<String,String> prefs = p.getPreferences();
System.out.println("blink allowed: " + prefs.get("browser.blink_allowed"));
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the firefox preferences as a map (key,value pair).voidparse()Parse the preferences file
-
Constructor Details
-
FirefoxPreferencesParser
public FirefoxPreferencesParser()
-
-
Method Details
-
parse
Parse the preferences file- Throws:
IOException- if an exception occurs while reading the preferences file.
-
getPreferences
Get the firefox preferences as a map (key,value pair). Note that all values (including integers and booleans) are stored as a string, so conversion to an appropriate type may be required.- Returns:
- a map containing firefox' preferences
-