Class KdeSettingsParser

java.lang.Object
com.github.markusbernhardt.proxy.search.desktop.kde.KdeSettingsParser

public class KdeSettingsParser extends Object
Parser for the KDE settings file. The KDE proxy settings are stored in the file:

.kde/share/config/kioslaverc

in the users home directory.
  • Field Details

    • settingsFile

      private File settingsFile
  • Constructor Details

    • KdeSettingsParser

      public KdeSettingsParser()
      Constructor
    • KdeSettingsParser

      public KdeSettingsParser(File settingsFile)
      Constructor
      Parameters:
      settingsFile - the settings file to use.
  • Method Details

    • parseSettings

      public Properties parseSettings() throws IOException
      Parse the settings file and extract all network.proxy.* settings from it.
      Returns:
      the parsed properties.
      Throws:
      IOException - on read error.
    • findSettingsFile

      private File findSettingsFile()
      Finds all the KDE network settings file.
      Returns:
      a file or null if does not exist.
    • findSettingsFile

      private File findSettingsFile(File settingsFile)
      Internal method to test if the settings file is at the given place.
      Parameters:
      settingsFile - the path to test.
      Returns:
      the file or null if it does not exist.