/** * Write the specified properties to the specified file. * * @param props * the properties to write * @param file * the file to write to * @throws IOException * when the properties could not be written to the file properly */ public static void writeProperties(Properties props, File file, boolean includeDefaults) throws IOException { writeProperties(props, new FileOutputStream(file), includeDefaults); }
/** * Save configuration properties to a file. * * @param props * the configuration properties * @param file * the file to write to * @throws IOException * if the settings could not be saved because of an I/O problem */ public static void saveConfigurationProperties(Properties props, File file, boolean includeDefaults) throws IOException { if (file.getParentFile().mkdirs() || file.getParentFile().canWrite()) { IOUtil.writeProperties(props, file, includeDefaults); } } }
/** * Save configuration properties to a file. * * @param props * the configuration properties * @param file * the file to write to * @throws IOException * if the settings could not be saved because of an I/O problem */ public static void saveConfigurationProperties(Properties props, File file, boolean includeDefaults) throws IOException { if (file.getParentFile().mkdirs() || file.getParentFile().canWrite()) { IOUtil.writeProperties(props, file, includeDefaults); } } }