public class Utilities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.math.BigInteger |
BIG_TWO |
| Constructor and Description |
|---|
Utilities() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<javax.net.ssl.SNIServerName> |
addToSNIServerNameList(java.util.List<javax.net.ssl.SNIServerName> serverNames,
java.lang.String hostname)
Puts
hostname into the serverNames list. |
static java.lang.String |
byte16HexString(int id) |
static boolean |
getBooleanProperty(java.lang.String propName,
boolean defaultValue)
Return the value of the boolean System property propName.
|
static java.lang.String |
indent(java.lang.String source) |
static java.lang.String |
indent(java.lang.String source,
java.lang.String prefix) |
static boolean |
privilegedGetBooleanProperty(java.lang.String theProp) |
static java.lang.Integer |
privilegedGetIntegerProperty(java.lang.String theProp) |
static java.lang.Integer |
privilegedGetIntegerProperty(java.lang.String theProp,
int defaultValue) |
static java.lang.String |
privilegedGetProperty(java.lang.String theProp,
java.lang.String defaultVal) |
static void |
reverseBytes(byte[] arr) |
static byte[] |
toByteArray(java.math.BigInteger bi)
Utility method to convert a BigInteger to a byte array in unsigned
format as needed in the handshake messages.
|
static java.lang.String |
toHexString(byte[] bytes) |
static java.lang.String |
toHexString(long lv) |
public static java.util.List<javax.net.ssl.SNIServerName> addToSNIServerNameList(java.util.List<javax.net.ssl.SNIServerName> serverNames,
java.lang.String hostname)
hostname into the serverNames list.
If the serverNames does not look like a legal FQDN, it will
not be put into the returned list.
Note that the returned list does not allow duplicated name type.
SNIServerNamepublic static boolean getBooleanProperty(java.lang.String propName,
boolean defaultValue)
public static java.lang.String indent(java.lang.String source)
public static java.lang.String indent(java.lang.String source,
java.lang.String prefix)
public static java.lang.String byte16HexString(int id)
public static java.lang.String toHexString(byte[] bytes)
public static java.lang.String toHexString(long lv)
public static byte[] toByteArray(java.math.BigInteger bi)
public static void reverseBytes(byte[] arr)
public static java.lang.String privilegedGetProperty(java.lang.String theProp,
java.lang.String defaultVal)
public static boolean privilegedGetBooleanProperty(java.lang.String theProp)
public static java.lang.Integer privilegedGetIntegerProperty(java.lang.String theProp,
int defaultValue)
public static java.lang.Integer privilegedGetIntegerProperty(java.lang.String theProp)