public final class HexUtils
extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
hexBytesOfLong(long v)
Builds an hex
String that represents the provided long value. |
static long |
longOfHexBytes(String str,
int offset)
Retrieves the
long value represented by the provided hex String. |
static <T extends CharSequence> |
validateHexBytes(T str)
Checks that the provided
CharSequence is a valid hex CharSequence,
throwing an IllegalArgumentException if it is not. |
public static <T extends CharSequence> T validateHexBytes(T str)
CharSequence is a valid hex CharSequence,
throwing an IllegalArgumentException if it is not.T - The type of CharSequence to validate.str - the CharSequence to check.CharSequence unchanged.public static long longOfHexBytes(String str,
int offset)
long value represented by the provided hex String.
Throws StringIndexOutOfBoundsException if offset is invalid.str - an hex String.offset - The index to start within str to start the conversion.long value.public static String hexBytesOfLong(long v)
String that represents the provided long value.v - the long value.String.