org.jboss.netty.util.internal
Class SystemPropertyUtil

java.lang.Object
  extended by org.jboss.netty.util.internal.SystemPropertyUtil

public class SystemPropertyUtil
extends Object

Accesses the system property swallowing a SecurityException.

Version:
$Rev: 2161 $, $Date: 2010-02-18 11:12:15 +0900 (Thu, 18 Feb 2010) $
Author:
The Netty Project, Trustin Lee

Method Summary
static String get(String key)
          Returns the value of the Java system property with the specified key.
static int get(String key, int def)
          Returns the value of the Java system property with the specified key, while falling back to the specified default value if the property access fails.
static String get(String key, String def)
          Returns the value of the Java system property with the specified key, while falling back to the specified default value if the property access fails.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static String get(String key)
Returns the value of the Java system property with the specified key.

Returns:
the property value. null if there's no such property or if an access to the specified property is not allowed.

get

public static String get(String key,
                         String def)
Returns the value of the Java system property with the specified key, while falling back to the specified default value if the property access fails.

Returns:
the property value. def if there's no such property or if an access to the specified property is not allowed.

get

public static int get(String key,
                      int def)
Returns the value of the Java system property with the specified key, while falling back to the specified default value if the property access fails.

Returns:
the property value. def if there's no such property or if an access to the specified property is not allowed.


Copyright © 2008-2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.