|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.scooterframework.common.util.PropertyFileUtil
public class PropertyFileUtil
PropertyFileUtil
Constructor Summary | |
---|---|
PropertyFileUtil()
|
Method Summary | |
---|---|
static java.util.Properties |
loadOrderedPropertiesFromFile(java.lang.String fullFileName)
Load all properties from a file |
static java.util.Properties |
loadPropertiesFromFile(java.lang.String fullFileName)
Load all properties from a file |
static java.util.Properties |
loadPropertiesFromResource(java.lang.String resourceName)
Load all properties from a file on classpath |
static java.util.Properties |
parseNestedPropertiesFromLine(java.lang.String line,
java.lang.String nameValueSpliter,
java.lang.String propertyDelimiter)
Returns properties from a nested property line. |
static void |
printAllProperties(java.util.Properties pp,
java.lang.String nameValueSpliter,
java.lang.String propertyDelimiter)
print out all properties. |
static void |
printAllProperties(java.util.ResourceBundle rb)
print out all properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyFileUtil()
Method Detail |
---|
public static java.util.Properties loadPropertiesFromResource(java.lang.String resourceName) throws java.lang.Exception
resourceName
- a name for a resource on classpath
java.lang.Exception
public static java.util.Properties loadPropertiesFromFile(java.lang.String fullFileName) throws java.lang.Exception
fullFileName
- full name of the file
java.lang.Exception
public static java.util.Properties loadOrderedPropertiesFromFile(java.lang.String fullFileName) throws java.lang.Exception
fullFileName
- full name of the file
java.lang.Exception
public static void printAllProperties(java.util.ResourceBundle rb)
public static void printAllProperties(java.util.Properties pp, java.lang.String nameValueSpliter, java.lang.String propertyDelimiter)
public static java.util.Properties parseNestedPropertiesFromLine(java.lang.String line, java.lang.String nameValueSpliter, java.lang.String propertyDelimiter)
Examples: For a property line routes.name.login=url=login, controller=home, action=new, the key of the property is routes.name.login, the nested key/value paires are url/login, controller/home, and action/new.
line
- a string of propertiesnameValueSpliter
- a short string that separates name and value elements in a pairpropertyDelimiter
- a char that separates pairs in a string line
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |