public final class PropertiesUtil
extends java.lang.Object
Properties
.Modifier | Constructor and Description |
---|---|
private |
PropertiesUtil()
Prevent instances of this utility class.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Properties |
getProperties(java.lang.String path)
This static method loads the
Properties from a properties file which path is given as parameter. |
static void |
save(java.util.Properties props,
java.lang.String path)
Stores a
Properties object to a properties file defined by a given path including an auto-creation
comment at the beginning of the file. |
public static java.util.Properties getProperties(java.lang.String path)
Properties
from a properties file which path is given as parameter.path
- The path to the properties file as string.Properties
object loaded from the given file path or nullpublic static void save(java.util.Properties props, java.lang.String path)
Properties
object to a properties file defined by a given path including an auto-creation
comment at the beginning of the file.props
- The Properties
object which shall be persisted.path
- The path to the properties file to which the properties shall be stored.