Here you can find the source of propertiesToString(final Properties properties)
public static String propertiesToString(final Properties properties)
//package com.java2s; //License from project: Open Source License import java.io.PrintWriter; import java.io.StringWriter; import java.util.Properties; public class Main { public static String propertiesToString(final Properties properties) { final StringWriter sw = new StringWriter(); final PrintWriter pw = new PrintWriter(sw); properties.list(pw);/* w ww . ja v a 2 s .c om*/ return sw.toString(); } }