class ConfigParser extends Object
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> | parse(File file)Return a Map using the contents of the File file. |
static Map<String,String> | parse(File file,
Map<String,String> map)Return a Map using the contents of the File file. |
static List<String> | parseSubscriptions(File file,
List<String> list)Return a List using the contents of the File file. |
static String | stripComments(String inputLine)Strip the comments from a String. |
static void | write(Map<String,String> map,
File file)Write contents of Map map to the File file. |
public static Map<String,String> parse(File file) throws IOException
file - A File to parse.IOException - if file cannot be read.public static Map<String,String> parse(File file, Map<String,String> map)
file - A File to attempt to parse.map - A Map containing values to use as defaults.public static List<String> parseSubscriptions(File file, List<String> list)
file - A File to attempt to parse.list - The default subscriptions to be saved and returned if the file cannot be readpublic static String stripComments(String inputLine)
inputLine - A String to strip comments from.public static void write(Map<String,String> map, File file) throws IOException
map - A Map to write to file.file - A File to write the Map to.IOException - if file cannot be written to.