Java Properties Classes

The JavaProperties class and its helpers are shown in the UML Class Diagram below (with private members hidden for clarity):

JavaProperties and helper classes.

The classes are: -

  • JavaProperties – a C# class that extends the Hashtable 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 Hashtable 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 Hashtable 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).