public final class HexUtilities
extends java.lang.Object
| Constructor and Description |
|---|
HexUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decodeFromHex(java.lang.String hexString)
Converts the given string in HEX representation to a byte array, ignores whitespaces and semicolons while doing
so.
|
static java.lang.String |
encodeToHex(byte[] bytes)
Converts the given byte array to a String in HEX representation.
|
static java.lang.String |
encodeToHex(byte[] bytes,
boolean uppercase,
boolean semicolons)
Converts the given byte array to a String in HEX representation.
|
public static java.lang.String encodeToHex(byte[] bytes,
boolean uppercase,
boolean semicolons)
bytes - the bytes to convert.uppercase - whether the resulting HEX string should be in uppercase format.semicolons - whether the hex string should be formatted with semicolons ':'.public static java.lang.String encodeToHex(byte[] bytes)
bytes - the bytes to convert.public static byte[] decodeFromHex(java.lang.String hexString)
throws java.lang.IllegalArgumentException
hexString - the HEX string to convert.java.lang.IllegalArgumentException - if the given HEX string is not valid.