public class ConfigLoader extends Object
| Constructor and Description |
|---|
ConfigLoader() |
| Modifier and Type | Method and Description |
|---|---|
static Properties |
loadConfig(File file)
Reads configuration file specified and loads key/value pairs found into
Properties objects. |
static Properties |
loadConfig(File file,
Properties props)
Reads configuration file specified and loads key/value pairs found into
Properties objects. |
static Properties |
loadConfig(String file)
Reads configuration file specified and loads key/value pairs found into
Properties objects. |
static Properties |
loadConfig(String file,
Properties props)
Reads configuration file specified and loads key/value pairs found into
Properties objects. |
public static Properties loadConfig(String file) throws Exception
Properties objects. The file specified must be in classpath.file - configuration file to be readProperties objectIOException - if any IO error occurs during file readExceptionpublic static Properties loadConfig(File file) throws Exception
Properties objects.file - configuration file to be readProperties objectIOException - if any IO error occurs during file readExceptionpublic static Properties loadConfig(String file, Properties props) throws Exception
Properties objects. The file specified must be in classpath.file - configuration file to be readprops - instance of Properties object which will hold
propertiesProperties objectIOException - if any IO error occurs during file readExceptionpublic static Properties loadConfig(File file, Properties props) throws Exception
Properties objects.file - configuration file to be readprops - instance of Properties object which will hold
propertiesProperties objectIOException - if any IO error occurs during file readExceptionCopyright © 2019. All rights reserved.