* @param aProps Properties.
*/
public PropertySetter(Properties aProps) {
- StringBuffer buf = new StringBuffer();
+ String propFile = createPropertyFile(aProps);
+ setLocation(new StringResource(propFile));
+ }
+
+ private static String createPropertyFile(Properties aProps) {
+ StringBuffer buf = new StringBuffer();
for (Object key: aProps.keySet()) {
buf.append(key);
buf.append("=");
buf.append(aProps.get(key));
buf.append("\n");
- }
- setLocation(new StringResource(buf.toString()));
- }
+ }
+ return buf.toString();
+ }
}