Package org.fedorahosted.openprops

Examples of org.fedorahosted.openprops.Properties.keySet()


    }

    public static List<HeaderEntry> headerToList(String entries) {
        Properties props = headerToProperties(entries);
        List<HeaderEntry> result = new ArrayList<HeaderEntry>();
        for (String key : props.keySet()) {
            result.add(new HeaderEntry(key, props.getProperty(key)));
        }
        return result;
    }
View Full Code Here


        assertEquals("key=value" + lineSep,
                PoUtility.propertiesToHeader(entries));
        entries.setProperty("key2", "value2");
        assertEquals("key=value" + lineSep + "key2=value2" + lineSep,
                PoUtility.propertiesToHeader(entries));
        entries.keySet().clear();
        entries.setProperty("key with\na newline and spaces", "value");
        assertEquals("key\\ with\\na\\ newline\\ and\\ spaces=value" + lineSep,
                PoUtility.propertiesToHeader(entries));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.