org.glassfish.persistence.common.database
Class PropertyHelper

java.lang.Object
  extended by org.glassfish.persistence.common.database.PropertyHelper

public class PropertyHelper
extends Object

Author:
Mitesh Meswani This class provides helper to load reources into property object.

Constructor Summary
PropertyHelper()
           
 
Method Summary
static void loadFromFile(Properties properties, String fileName)
          Loads properties list from the specified file into specified Properties object.
static void loadFromResource(Properties properties, String resourceName, ClassLoader classLoader)
          Loads properties list from the specified resource into specified Properties object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyHelper

public PropertyHelper()
Method Detail

loadFromResource

public static void loadFromResource(Properties properties,
                                    String resourceName,
                                    ClassLoader classLoader)
                             throws IOException
Loads properties list from the specified resource into specified Properties object.

Parameters:
properties - Properties object to load
resourceName - Name of resource.
classLoader - The class loader that should be used to load the resource. If null,primordial class loader is used.
Throws:
IOException

loadFromFile

public static void loadFromFile(Properties properties,
                                String fileName)
                         throws IOException
Loads properties list from the specified file into specified Properties object.

Parameters:
properties - Properties object to load
fileName - Fully qualified path name to the file.
Throws:
IOException


Copyright © 2012. All Rights Reserved.