The System Bundle contains helpful classes for associating long and integer values to objects in hashtables. In addition, there is a class that assists writing and reading properties in and from a text file. The com.prosyst.util.hash package keeps all these utilities.
Generally, hashtable facilities are two types – with synchronized methods and with not synchronized methods.
Class |
Synchronization |
Key format |
Value Format |
|---|---|---|---|
HashIntObjNS |
No |
int |
java.lang.Object |
HashIntObjS |
Yes |
int |
java.lang.Object |
HashObjIntNS |
No |
java.lang.Object |
int |
HashObjIntS |
Yes |
java.lang.Object |
int |
HashLongObjNS |
No |
long |
java.lang.Object |
HashLongObjS |
Yes |
long |
java.lang.Object |
HashObjLongNS |
No |
java.lang.Object |
long |
HashObjLongS |
Yes |
java.lang.Object |
long |
The XProperties class extends java.util.Properties and can help developers in reading/writing properties from/in a text file, which is represented by an input/output stream. You can create and access only files in the directory allocated for your bundle in the framework storage. To reach this directory, you invoke the getDataFile method of the current BundleContext.