本文整理了Java中info.aduna.io.IOUtil.writeProperties()
方法的一些代码示例,展示了IOUtil.writeProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IOUtil.writeProperties()
方法的具体详情如下:
包路径:info.aduna.io.IOUtil
类名称:IOUtil
方法名:writeProperties
[英]Write the specified properties to the specified file.
[中]将指定的属性写入指定的文件。
代码示例来源:origin: info.aduna.commons/aduna-commons-io
/**
* 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);
}
代码示例来源:origin: info.aduna.appbase/aduna-appbase-core
/**
* 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);
}
}
}
代码示例来源:origin: org.openrdf.sesame/sesame-config
/**
* 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);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!