public String serialize() {
PropertiesConfiguration propConfig = new PropertiesConfiguration();
propConfig.copy(this);
StringWriter writer = new StringWriter();
try {
propConfig.save(writer);
} catch (ConfigurationException e) {
// this should never happen
throw new IllegalStateException(e);
}
return writer.toString();