Package org.bouncycastle.util
Class Properties
- java.lang.Object
-
- org.bouncycastle.util.Properties
-
public class Properties extends java.lang.Object
Utility method for accessing system properties.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EMULATE_ORACLE
If set the provider will attempt, where possible, to behave the same way as the oracle one.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.math.BigInteger
asBigInteger(java.lang.String propertyName)
static int
asInteger(java.lang.String propertyName, int defaultValue)
static java.util.Set
asKeySet(java.lang.String propertyName)
static java.lang.String
getPropertyValue(java.lang.String propertyName)
static boolean
isOverrideSet(java.lang.String propertyName)
Return whether a particular override has been set to true.static boolean
isOverrideSet(java.lang.String propertyName, boolean defIsTrue)
Return whether a particular override has been set to true.static boolean
isOverrideSetTo(java.lang.String propertyName, boolean isTrue)
Return whether a particular override has been set to false.static boolean
removeThreadOverride(java.lang.String propertyName)
Remove any value for the specified override property for the current thread only.static boolean
setThreadOverride(java.lang.String propertyName, boolean enable)
Enable the specified override property for the current thread only.
-
-
-
Field Detail
-
EMULATE_ORACLE
public static final java.lang.String EMULATE_ORACLE
If set the provider will attempt, where possible, to behave the same way as the oracle one.- See Also:
- Constant Field Values
-
-
Method Detail
-
isOverrideSet
public static boolean isOverrideSet(java.lang.String propertyName)
Return whether a particular override has been set to true.- Parameters:
propertyName
- the property name for the override.- Returns:
- true if the property is set to "true", false otherwise.
-
isOverrideSet
public static boolean isOverrideSet(java.lang.String propertyName, boolean defIsTrue)
Return whether a particular override has been set to true.- Parameters:
propertyName
- the property name for the override.- Returns:
- true if the property is set to "true", false otherwise.
-
setThreadOverride
public static boolean setThreadOverride(java.lang.String propertyName, boolean enable)
Enable the specified override property for the current thread only.- Parameters:
propertyName
- the property name for the override.enable
- true if the override should be enabled, false if it should be disabled.- Returns:
- true if the override was already set true, false otherwise.
-
removeThreadOverride
public static boolean removeThreadOverride(java.lang.String propertyName)
Remove any value for the specified override property for the current thread only.- Parameters:
propertyName
- the property name for the override.- Returns:
- true if the override was already set true in thread local, false otherwise.
-
isOverrideSetTo
public static boolean isOverrideSetTo(java.lang.String propertyName, boolean isTrue)
Return whether a particular override has been set to false.- Parameters:
propertyName
- the property name for the override.isTrue
- true if the override should be true, false otherwise.- Returns:
- true if the property is set to the value of isTrue, false otherwise.
-
asInteger
public static int asInteger(java.lang.String propertyName, int defaultValue)
-
asBigInteger
public static java.math.BigInteger asBigInteger(java.lang.String propertyName)
-
asKeySet
public static java.util.Set asKeySet(java.lang.String propertyName)
-
getPropertyValue
public static java.lang.String getPropertyValue(java.lang.String propertyName)
-
-