Class ConfigFileUtils
- java.lang.Object
-
- hudson.plugins.android_emulator.util.ConfigFileUtils
-
public class ConfigFileUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ConfigFileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,String>
parseConfigFile(File configFile)
Parses the contents of a .properties or .ini file into a map.static void
writeConfigFile(File configFile, Map<String,String> values)
Write the configuration values dependent of the file extension.
-
-
-
Method Detail
-
parseConfigFile
public static Map<String,String> parseConfigFile(File configFile) throws IOException
Parses the contents of a .properties or .ini file into a map.- Parameters:
configFile
- The file to read.- Returns:
- The key-value pairs contained in the file, ignoring any comments or blank lines.
- Throws:
IOException
- If the file could not be read or an unsupported file extension is used.
-
writeConfigFile
public static void writeConfigFile(File configFile, Map<String,String> values) throws IOException
Write the configuration values dependent of the file extension. Currently supported are .properties and .ini files.- Parameters:
configFile
- the destination config file.values
- configuration key-value-pairs to write.- Throws:
IOException
- If the file could not be written or an unsupported file extension is used.
-
-