Here you can find the source of saveProperties(Properties p, String sFile)
Parameter | Description |
---|---|
p | Objek Properties |
sFile | String path file tujuan |
public static void saveProperties(Properties p, String sFile)
//package com.java2s; //License from project: Open Source License import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties; public class Main { /**/*from w ww . ja v a 2s .c o m*/ * Menyimpan file properties ke file * @param p Objek Properties * @param sFile String path file tujuan */ public static void saveProperties(Properties p, String sFile) { try { FileOutputStream out = new FileOutputStream(sFile); p.store(out, "Ini baris komentar\nFile Konfigurasi"); System.out.println("File konfigurasi disimpan....."); out.close(); } catch (IOException ex) { System.out.println(ex.getMessage()); } } }