static public HashMap<String,String> readProperties(String configString) {
            final HashMap<String,String> map = new HashMap<String,String>();
            int endLineIndex;
            for (int startIndex = 0; startIndex < configString.length(); startIndex = endLineIndex + 1) {

                endLineIndex = configString.indexOf('\n', startIndex);
                final String line = configString.substring(startIndex,
                        endLineIndex == -1 ? configString.length() : endLineIndex)
                        .trim();
                if (!"".equals(line) && !line.startsWith("#")) {
                    addNameValue(line, map);
                }
                if (endLineIndex == -1) {
                    break;
                }

            }

            return map;
        }