The JavaProperties class and its helpers are shown in the UML class diagram below:
The classes are: –
- JavaProperties – a C# class that extends the generic collection Dictionary<TKey, TValue> class to provide functionality similar to the Java Properties class – it maintains a collection of string key-value pairs and can load them from or store them to a Java style “.properties” file.
- JavaPropertyReader – this class is used by JavaProperties to read Java style properties from an input Stream. It can also be used directly to load properties into any Dictionary<string, string> or derived class.
- JavaProperetyWriter – this class is used by JavaProperties to store Java style properties to an output Stream. It can also be used directly to store properties from any Dictionary<string, string> or derived class.
- ParseException – this exception is thrown if the contents of the Stream being read by JavaPropertyReader are invalid (for example a malformed Unicode escape string).