Here you can find the source of toRawString(Properties props)
public static String toRawString(Properties props)
//package com.java2s; //License from project: Apache License import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Properties; public class Main { public static String toRawString(Properties props) { ByteArrayOutputStream baos = null; try {//ww w. j av a2s . c o m baos = new ByteArrayOutputStream(); props.store(baos, ""); return new String(baos.toByteArray()); } catch (IOException ex) { return ""; } finally { if (baos != null) { try { baos.close(); } catch (IOException ex) { } } } } }