Class FirefoxPreferencesParser
java.lang.Object
net.sourceforge.jnlp.proxy.browser.FirefoxPreferencesParser
- All Implemented Interfaces:
PreferencesParser
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"));
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the firefox preferences as a map (key,value pair).voidparse()Parse the preferences file
-
Field Details
-
LOG
-
prefs
-
-
Constructor Details
-
FirefoxPreferencesParser
public FirefoxPreferencesParser()
-
-
Method Details
-
parse
Parse the preferences file- Specified by:
parsein interfacePreferencesParser- 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.- Specified by:
getPreferencesin interfacePreferencesParser- Returns:
- a map containing firefox' preferences
-