public final class SystemPropertyUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FILE_ENCODING |
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(String key)
Returns
true if and only if the system property with the specified key exists. |
static void |
debug() |
static String |
get(String key)
Returns the value of the Java system property with the specified
key , while falling back to null 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. |
static boolean |
getBoolean(String key,
boolean 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 int |
getInt(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 long |
getLong(String key,
long 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 boolean |
isFileEncodingCorrect() |
static void |
refresh()
Re-retrieves all system properties so that any post-launch properties updates are retrieved.
|
public static final String FILE_ENCODING
public static void refresh()
public static boolean isFileEncodingCorrect()
public static final boolean contains(String key)
true
if and only if the system property with the specified key
exists.public static final String get(String key)
key
, while falling back to null
if the
property access fails.null
public static final String get(String key, String def)
key
, while falling back to the specified default
value if
the property access fails.def
if there's no such property or if an access to the
specified property is not allowed.public static boolean getBoolean(String key, boolean def)
key
, while falling back to the specified default
value if
the property access fails.def
if there's no such property or if an access to the
specified property is not allowed.public static int getInt(String key, int def)
key
, while falling back to the specified default
value if
the property access fails.def
if there's no such property or if an access to the
specified property is not allowed.public static long getLong(String key, long def)
key
, while falling back to the specified default
value if
the property access fails.def
if there's no such property or if an access to the
specified property is not allowed.public static void debug()
Copyright © 2009–2019 Waarp. All rights reserved.