本文整理了Java中info.aduna.io.IOUtil.readProperties()
方法的一些代码示例,展示了IOUtil.readProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IOUtil.readProperties()
方法的具体详情如下:
包路径:info.aduna.io.IOUtil
类名称:IOUtil
方法名:readProperties
[英]Read properties from the specified file.
[中]从指定的文件读取属性。
代码示例来源:origin: info.aduna.commons/aduna-commons-io
/**
* Read properties from the specified InputStream.
*
* @param in
* the stream to read from. The stream will be closed by this method.
* @return Properties loaded from the specified stream. The stream will be
* closed by this method.
* @throws IOException
* when the stream could not be read properly
*/
public static Properties readProperties(InputStream in)
throws IOException
{
return readProperties(in, null);
}
代码示例来源:origin: info.aduna.commons/aduna-commons-io
/**
* Read properties from the specified file.
*
* @param propsFile
* the file to read from
* @return Properties loaded from the specified file
* @throws IOException
* when the file could not be read properly
*/
public static Properties readProperties(File propsFile)
throws IOException
{
return readProperties(propsFile, null);
}
代码示例来源:origin: info.aduna.commons/aduna-commons-io
/**
* Read properties from the specified file.
*
* @param propsFile
* the file to read from
* @param defaults
* the default properties to use
* @return Properties loaded from the specified file
* @throws IOException
* when the file could not be read properly
*/
public static Properties readProperties(File propsFile, Properties defaults)
throws IOException
{
return readProperties(new FileInputStream(propsFile), defaults);
}
代码示例来源:origin: info.aduna.appbase/aduna-appbase-core
/**
* Load configuration properties from the specified file.
*
* @param file
* the file to load from
* @return the contents of the file as Properties, or null if the file did
* not exist
* @throws IOException
* if the contents of the file could not be read due to an I/O
* problem
*/
public static Properties loadConfigurationProperties(File file, Properties defaults)
throws IOException
{
Properties result = null;
if (file.exists()) {
result = IOUtil.readProperties(file, defaults);
}
else {
result = new Properties(defaults);
}
return result;
}
代码示例来源:origin: org.openrdf.sesame/sesame-config
/**
* Load configuration properties from the specified file.
*
* @param file
* the file to load from
* @return the contents of the file as Properties, or null if the file did
* not exist
* @throws IOException
* if the contents of the file could not be read due to an I/O
* problem
*/
public static Properties loadConfigurationProperties(File file, Properties defaults)
throws IOException
{
Properties result = null;
if (file.exists()) {
result = IOUtil.readProperties(file, defaults);
}
else {
result = new Properties(defaults);
}
return result;
}
代码示例来源:origin: org.openrdf.sesame/sesame-config
InputStream in = ResourceUtil.getInputStream(defaultResourceName);
if (in != null) {
defaultResult = IOUtil.readProperties(in, defaults);
result = IOUtil.readProperties(in, defaultResult);
代码示例来源:origin: info.aduna.appbase/aduna-appbase-core
InputStream in = ResourceUtil.getInputStream(defaultResourceName);
if (in != null) {
defaultResult = IOUtil.readProperties(in, defaults);
result = IOUtil.readProperties(in, defaultResult);
内容来源于网络,如有侵权,请联系作者删除!