Java Utililty Methods Properties Parse

List of utility methods to do Properties Parse

Description

The list of methods to do Properties Parse are organized into topic(s).

Method

booleanparseBooleanProperty(Properties props, String keyword, boolean defaultValue)
parse Boolean Property
return parseBoolean(props != null ? props.getProperty(keyword) : null, defaultValue);
HashtableparseHtmlProperties(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);
...
PropertiesparseProperties(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) {
...
HashtableparsePropertiesString(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;
...
MapparseProps(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;
...