Site hosted by Angelfire.com: Build your free website today!
/*
 * @(#)CCProperty.java	
 */
 
import java.io.*;  
import java.util.*;
import java.lang.*;
import java.io.File.*;

/**
 * This class enchanced the getProperty() method 
 * that will be used staticly from this class.
 * 

*/ public final class CCProperty { private static String propertyName = "cc.properties"; private static String temp = ""; static FileInputStream in = null; static Properties props = new Properties(); /** * Constructor . Nothing to do with it. */ public CCProperty() { } /** * Retrieve the property value from property file

* @param s property's key * @return value value of the property's key */ public static String getProperties(String s) { try { in = new FileInputStream (propertyName); props.load(in); temp = props.getProperty(s); } catch (IOException exc) { System.out.println("Error : " + exc.toString()); } finally { try { in.close(); } catch (Exception exc1) { System.out.println("Error : " + exc1.toString()); } return temp; } } }