Class KdeSettingsParser
- java.lang.Object
-
- com.github.markusbernhardt.proxy.search.desktop.kde.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
-
Constructor Summary
Constructors Constructor Description KdeSettingsParser()
ConstructorKdeSettingsParser(java.io.File settingsFile)
Constructor
-
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.
-
-
-
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.
-
-