Skip to main content

Java Properties Classes (Original)

Note: This page relates to the JavaProperties classes in Kajabity Tools Original library, for the revised Kajabity.Tools.Java library go to Java Properties Classes.

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

UML Class diagram of Java Properties 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).