Class KdeSettingsParser


  • public class KdeSettingsParser
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File settingsFile  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.io.File findSettingsFile()
      Finds all the KDE network settings file.
      private java.io.File findSettingsFile​(java.io.File settingsFile)
      Internal method to test if the settings file is at the given place.
      java.util.Properties parseSettings()
      Parse the settings file and extract all network.proxy.* settings from it.
      • Methods inherited from class java.lang.Object

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

      • settingsFile

        private java.io.File settingsFile
    • Constructor Detail

      • KdeSettingsParser

        public KdeSettingsParser()
        Constructor
      • KdeSettingsParser

        public KdeSettingsParser​(java.io.File settingsFile)
        Constructor
        Parameters:
        settingsFile - the settings file to use.
    • Method Detail

      • parseSettings

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

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

        private java.io.File findSettingsFile​(java.io.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.