Here you can find the source of saveConfig()
Parameter | Description |
---|---|
IOException | an exception |
public static void saveConfig() throws IOException
//package com.java2s; /*/*from ww w.j a va 2 s .com*/ * Copyright 2012,2013 Robert Huitema robert@42.co.nz * * This file is part of FreeBoard. (http://www.42.co.nz/freeboard) * * FreeBoard is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * FreeBoard is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with FreeBoard. If not, see <http://www.gnu.org/licenses/>. */ import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Properties; public class Main { private static Properties props; public static File cfg = null; /** * Save the current config to disk. * @throws IOException */ public static void saveConfig() throws IOException { if (props == null) return; props.store(new FileWriter(cfg), null); } }