com.jfw.util
Class PropertiesReader

java.lang.Object
  extended by com.jfw.util.PropertiesReader

public final class PropertiesReader
extends java.lang.Object

Return a Properties object relative of a properties file. All methods are static and thread safe.


Constructor Summary
PropertiesReader()
           
 
Method Summary
static java.util.Properties readProperties(java.lang.String fileName)
          Read a properties file.
static void readProperties(java.lang.String fileName, java.util.Properties properties)
          Call method readProperties(String , String, Properties) for read the properties file.
static void readProperties(java.lang.String fileName, java.lang.String language, java.util.Properties properties)
          Read a properties file.
static void readPropertiesFile(java.lang.String propertiesPath, java.lang.String fileName, java.util.Properties properties)
          Read a properties file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesReader

public PropertiesReader()
Method Detail

readProperties

public static void readProperties(java.lang.String fileName,
                                  java.lang.String language,
                                  java.util.Properties properties)
                           throws JFWGenericException
Read a properties file. The properties file must be in the classpath.

Parameters:
fileName - the name of the properties file.
properties - the object to use for save the content of the properties file. Must be not null.
Throws:
JFWGenericException

readProperties

public static void readProperties(java.lang.String fileName,
                                  java.util.Properties properties)
                           throws JFWGenericException
Call method readProperties(String , String, Properties) for read the properties file. The value of parameter language is null.

Throws:
JFWGenericException

readProperties

public static java.util.Properties readProperties(java.lang.String fileName)
                                           throws JFWGenericException
Read a properties file.

Parameters:
fileName - the name of the properties file.
Returns:
a Properties object.
Throws:
JFWGenericException

readPropertiesFile

public static void readPropertiesFile(java.lang.String propertiesPath,
                                      java.lang.String fileName,
                                      java.util.Properties properties)
                               throws JFWGenericException
Read a properties file. The absolute path of the properties file must be given.

Parameters:
fileName - the name of the properties file.
propertiesPath - the absolute path of the properties file.
properties - the object to use for save the content of the properties file. Must be not null.
Throws:
JFWGenericException