|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ontopia.utils.PropertyUtils
public class PropertyUtils
INTERNAL: Utility class for handling properties and their values.
Constructor Summary | |
---|---|
PropertyUtils()
|
Method Summary | |
---|---|
static int |
getInt(String property_value)
|
static int |
getInt(String property_value,
int default_value)
INTERNAL: Returns the property value as an int. |
static String |
getProperty(Map properties,
String name)
INTERNAL: Helper method used to get better error messages with less typing. |
static String |
getProperty(Map properties,
String name,
boolean required)
INTERNAL: Helper method used to get better error messages with less typing. |
static boolean |
isTrue(Map properties,
String name)
INTERNAL: Same as isTrue(Map, String, boolean) with the default set to false; |
static boolean |
isTrue(Map properties,
String name,
boolean default_value)
INTERNAL: Helper method used to get the value of boolean properties. |
static boolean |
isTrue(String property_value)
|
static boolean |
isTrue(String property_value,
boolean default_value)
|
static Properties |
loadProperties(File propfile)
INTERNAL; Reads properties from a file. |
static Properties |
loadProperties(InputStream istream)
|
static Properties |
loadProperties(String propfile)
INTERNAL; Reads properties from a file. |
static Properties |
loadPropertiesFromClassPath(String resource)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyUtils()
Method Detail |
---|
public static String getProperty(Map properties, String name)
public static String getProperty(Map properties, String name, boolean required)
public static boolean isTrue(Map properties, String name, boolean default_value)
public static boolean isTrue(Map properties, String name)
public static boolean isTrue(String property_value)
public static boolean isTrue(String property_value, boolean default_value)
public static int getInt(String property_value, int default_value)
public static int getInt(String property_value) throws NumberFormatException
NumberFormatException
public static Properties loadProperties(String propfile) throws IOException
IOException
public static Properties loadProperties(File propfile) throws IOException
IOException
public static Properties loadPropertiesFromClassPath(String resource) throws IOException
IOException
public static Properties loadProperties(InputStream istream) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |