Package nz.ac.waikato.cms.core
Class PropsUtils
java.lang.Object
nz.ac.waikato.cms.core.PropsUtils
Helper class for properties files.
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanload(Properties props, String filename) Loads the properties from the given file.static booleansave(Properties props, String filename) Saves the properties to the given file.static booleansave(Properties props, String filename, String comment) Saves the properties to the given file.
-
Constructor Details
-
PropsUtils
public PropsUtils()
-
-
Method Details
-
load
Loads the properties from the given file.- Parameters:
props- the properties object to usefilename- the file to load the properties from- Returns:
- true if successfully loaded
-
save
Saves the properties to the given file.- Parameters:
props- the properties object to usefilename- the file to save the properties to- Returns:
- true if successfully written
-
save
Saves the properties to the given file.- Parameters:
props- the properties object to usefilename- the file to save the properties tocomment- the comment to use, can be null- Returns:
- true if successfully written
-