org.apache.logging.log4j.util
Class PropertiesUtil

java.lang.Object
  extended by org.apache.logging.log4j.util.PropertiesUtil

public class PropertiesUtil
extends Object

Utility class to help with accessing System Properties.


Constructor Summary
PropertiesUtil(Properties props)
           
PropertiesUtil(String propsLocn)
           
 
Method Summary
 boolean getBooleanProperty(String name)
           
 boolean getBooleanProperty(String name, boolean defaultValue)
           
 int getIntegerProperty(String name, int defaultValue)
           
 long getLongProperty(String name, long defaultValue)
           
static PropertiesUtil getProperties()
           
 String getStringProperty(String name)
           
 String getStringProperty(String name, String defaultValue)
           
static Properties getSystemProperties()
          Return the system properties or an empty Properties object if an error occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesUtil

public PropertiesUtil(Properties props)

PropertiesUtil

public PropertiesUtil(String propsLocn)
Method Detail

getProperties

public static PropertiesUtil getProperties()

getStringProperty

public String getStringProperty(String name)

getIntegerProperty

public int getIntegerProperty(String name,
                              int defaultValue)

getLongProperty

public long getLongProperty(String name,
                            long defaultValue)

getStringProperty

public String getStringProperty(String name,
                                String defaultValue)

getBooleanProperty

public boolean getBooleanProperty(String name)

getBooleanProperty

public boolean getBooleanProperty(String name,
                                  boolean defaultValue)

getSystemProperties

public static Properties getSystemProperties()
Return the system properties or an empty Properties object if an error occurs.

Returns:
The system properties.


Copyright © 1999-2013 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.