public static String extract(String line, String key) {
        if (line == null) {
            return null;
        }
        String code = extractCode(line);
        int i = code.indexOf(key + assign);
        if (i == -1) //key not found
        {
            return null;
        }
        int end = code.indexOf(seperator, i);
        if (end == -1) {
            end = code.length();
        }
        try {
            String ret = code.substring(code.indexOf(assign, i) + 1, end);
            if (ret.length() == 0) {
                return null;
            }
            return ret;
        } catch (IndexOutOfBoundsException e) {
            return null;
        }
    }