Registrypublic class Registry extends Object This class maintains the registry, it is a warpper over Properties class. |
Fields Summary |
---|
private Properties | registryCreates a new instance of Registry | FileOutputStream | out | FileInputStream | in | File | registryFile |
Constructors Summary |
---|
public Registry()
|
Methods Summary |
---|
public void | close()
if(in != null)
in.close();
| public java.lang.String | getProperty(java.lang.String key)
return registry.getProperty(key);
| public void | load(java.io.File registryFile)
this.registryFile = registryFile;
if(!registryFile.exists()) {
registryFile.createNewFile();
}
in = new FileInputStream(registryFile);
registry = new Properties();
registry.load(in);
| public void | setProperty(java.lang.String key, java.lang.String value)
registry.setProperty(key, value);
| public void | store()
out = new FileOutputStream(registryFile);
registry.store(out, null);
out.close();
|
|