|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.getdown.util.ConfigUtil
public class ConfigUtil
Parses a file containing key/value pairs and returns a HashMap with the values. Keys may
be repeated, in which case they will be made to reference an array of values.
| Constructor Summary | |
|---|---|
ConfigUtil()
|
|
| Method Summary | |
|---|---|
static String[] |
getMultiValue(Map<String,Object> data,
String name)
Massages a single string into an array and leaves existing array values as is. |
static Map<String,Object> |
parseConfig(File config,
boolean checkPlatform)
Parses a configuration file containing key/value pairs. |
static List<String[]> |
parsePairs(File config,
boolean checkPlatform)
Parses a configuration file containing key/value pairs. |
static List<String[]> |
parsePairs(Reader config,
boolean checkPlatform)
See parsePairs(File,boolean). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigUtil()
| Method Detail |
|---|
public static List<String[]> parsePairs(File config,
boolean checkPlatform)
throws IOException
checkPlatform - if true, platform qualifiers will be used to filter out pairs that do
not match the current platform; if false, all pairs will be returned.
String[] instances containing the key/value pairs in the
order they were parsed from the file.
IOException
public static List<String[]> parsePairs(Reader config,
boolean checkPlatform)
throws IOException
parsePairs(File,boolean).
IOException
public static Map<String,Object> parseConfig(File config,
boolean checkPlatform)
throws IOException
IOException
public static String[] getMultiValue(Map<String,Object> data,
String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||