Class FirefoxSettingParser


  • class FirefoxSettingParser
    extends java.lang.Object
    Parser for the Firefox settings file. Will extract all relevant proxy settings form the configuration file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.io.File getSettingsFile​(FirefoxProfileSource source)
      Reads the profile.ini, searches for the profiles directory and returns a file object pointing to the settings file.
      java.util.Properties parseSettings​(FirefoxProfileSource source)
      Parse the settings file and extract all network.proxy.* settings from it.
      private java.lang.String removeDoubleQuotes​(java.lang.String string)
      Removes leading and trailing double quotes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FirefoxSettingParser

        public FirefoxSettingParser()
        Constructor
    • Method Detail

      • parseSettings

        public java.util.Properties parseSettings​(FirefoxProfileSource source)
                                           throws java.io.IOException
        Parse the settings file and extract all network.proxy.* settings from it.
        Parameters:
        source - of the Firefox profiles.
        Returns:
        the parsed properties.
        Throws:
        java.io.IOException - on read error.
      • removeDoubleQuotes

        private java.lang.String removeDoubleQuotes​(java.lang.String string)
        Removes leading and trailing double quotes.
        Parameters:
        string -
        Returns:
      • getSettingsFile

        protected java.io.File getSettingsFile​(FirefoxProfileSource source)
                                        throws java.io.IOException
        Reads the profile.ini, searches for the profiles directory and returns a file object pointing to the settings file.
        Parameters:
        source - of the Firefox profiles.
        Returns:
        File object pointing to the settings file
        Throws:
        java.io.IOException - on read error.