FileDocCategorySizeDatePackage
Registry.javaAPI DocGlassfish v2 API3200Fri May 04 22:30:24 BST 2007com.sun.enterprise.addon

Registry

public class Registry extends Object
This class maintains the registry, it is a warpper over Properties class.
author
servesh.singh@sun.com

Fields Summary
private Properties
registry
Creates a new instance of Registry
FileOutputStream
out
FileInputStream
in
File
registryFile
Constructors Summary
public Registry()

 
    
      
    
Methods Summary
public voidclose()

        if(in != null)
            in.close();
    
public java.lang.StringgetProperty(java.lang.String key)

         return registry.getProperty(key);
    
public voidload(java.io.File registryFile)

        this.registryFile = registryFile;
        if(!registryFile.exists()) {
            registryFile.createNewFile();
        }
        in = new FileInputStream(registryFile);
        registry = new Properties();
        registry.load(in);
    
public voidsetProperty(java.lang.String key, java.lang.String value)

        registry.setProperty(key, value);
    
public voidstore()

        out = new FileOutputStream(registryFile);
        registry.store(out, null);  
        out.close();