List of utility methods to do Properties Parse
boolean | parseBooleanProperty(Properties props, String keyword, boolean defaultValue) parse Boolean Property return parseBoolean(props != null ? props.getProperty(keyword) : null, defaultValue);
|
Hashtable | parseHtmlProperties(String s) Parse HTML Properties boolean debug = false; Hashtable properties = new Hashtable(); if (debug) { System.err.println("Source:" + s); while (true) { if (debug) { System.err.println("S:" + s); ... |
Properties | parseProperties(final String string) parse Properties final Properties properties = new Properties(); final int len = string.length(); String key = null; int index = 0; while (true) { final int newIndex = string.indexOf('=', index); if (newIndex < 0) { if (key != null && len > index) { ... |
Hashtable | parsePropertiesString(String s) Parse the semi-colon delimited string of name=value properties. Hashtable properties = new Hashtable(); if (s != null) { StringTokenizer tok = new StringTokenizer(s, ";"); while (tok.hasMoreTokens()) { String nameValue = tok.nextToken(); int idx = nameValue.indexOf("="); if (idx < 0) { continue; ... |
Map | parseProps(Properties p) parse Props Map<String, int[]> h = new HashMap<String, int[]>(); Enumeration<Object> it = p.keys(); while (it.hasMoreElements()) { String key = (String) it.nextElement(); String val = (String) p.getProperty(key); int[] data = new int[3]; StringTokenizer st = new StringTokenizer(val); int ix = 0; ... |