public Map unmarshal()

in geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/model/StringMapAdapter.java [37:49]


    public Map<String, String> unmarshal(String s) throws Exception {
        if (s == null) {
            return null;
        }
        Properties properties = new Properties();
        ByteArrayInputStream in = new ByteArrayInputStream(s.getBytes());
        properties.load(in);
        Map<String, String> map = new HashMap<String, String>(properties.size());
        for (Map.Entry entry: properties.entrySet()) {
            map.put((String)entry.getKey(), (String)entry.getValue());
        }
        return map;
    }