Javaproperties
Javaproperties refers to the Java properties mechanism, primarily implemented by the java.util.Properties class. It provides a simple, text-based way to store and retrieve a set of string key-value pairs, typically used for configuration data and localization strings in Java applications.
The standard properties file format uses plain text with lines containing key-value pairs. A line can use
Key APIs provided by java.util.Properties include:
- load(InputStream) and load(Reader) to read properties from a stream or reader.
- store(OutputStream, String) and store(Writer, String) to write properties with an optional comment.
- getProperty(String key) and setProperty(String key, String value), with getProperty also offering a default value variant.
- propertyNames() to enumerate keys, and methods to work with XML representations.
Encoding issues are a consideration: the standard .properties format uses ISO-8859-1 by default, with non-Latin characters