public final class PropertyUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Properties |
loadPropertyFile(File propfile,
boolean fail,
boolean useSystemProps)
Reads a property file, resolving all internal variables.
|
static Properties |
loadPropertyFile(File propfile,
boolean fail,
boolean useSystemProps,
org.codehaus.plexus.logging.Logger logger)
Reads a property file, resolving all internal variables.
|
static Properties |
loadPropertyFile(File propFile,
Properties baseProps)
Reads a property file, resolving all internal variables, using the supplied base properties.
|
static Properties |
loadPropertyFile(File propFile,
Properties baseProps,
org.codehaus.plexus.logging.Logger logger)
Reads a property file, resolving all internal variables, using the supplied base properties.
|
public static Properties loadPropertyFile(File propFile, Properties baseProps) throws IOException
The properties are resolved iteratively, so if the value of property A refers to property B, then after resolution the value of property B will contain the value of property B.
propFile - The property file to load.baseProps - Properties containing the initial values to substitute into the properties file.IOException - if profile does not exist, or cannot be read.public static Properties loadPropertyFile(File propFile, Properties baseProps, org.codehaus.plexus.logging.Logger logger) throws IOException
The properties are resolved iteratively, so if the value of property A refers to property B, then after resolution the value of property B will contain the value of property B.
propFile - The property file to load.baseProps - Properties containing the initial values to substitute into the properties file.logger - Logger instanceIOException - if profile does not exist, or cannot be read.public static Properties loadPropertyFile(File propfile, boolean fail, boolean useSystemProps) throws IOException
propfile - The property file to loadfail - whether to throw an exception when the file cannot be loaded or to return nulluseSystemProps - whether to incorporate System.getProperties settings into the returned Properties object.IOException - if profile does not exist, or cannot be read.public static Properties loadPropertyFile(File propfile, boolean fail, boolean useSystemProps, org.codehaus.plexus.logging.Logger logger) throws IOException
propfile - The property file to loadfail - whether to throw an exception when the file cannot be loaded or to return nulluseSystemProps - whether to incorporate System.getProperties settings into the returned Properties object.logger - Logger instanceIOException - if profile does not exist, or cannot be read.Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.