Here you can find the source of saveProperties(Properties prop, String fileName, String remark)
public static boolean saveProperties(Properties prop, String fileName, String remark)
//package com.java2s; //License from project: Apache License import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Properties; public class Main { public static boolean saveProperties(Properties prop, String fileName, String remark) { OutputStream fos;/*from ww w . j a va2 s .co m*/ try { fos = new FileOutputStream(fileName); prop.store(fos, remark); } catch (FileNotFoundException e) { return false; } catch (IOException e) { return false; } return true; } }