Modifier and Type | Method and Description |
---|---|
static NumberFormatException |
numberFormatOutOfLongRange(CharSequence s)
Creates a
NumberFormatException with a consistent error message. |
static long |
parseUnsignedLong(String s) |
static long |
parseUnsignedLongHex(CharSequence s)
Parse the hex representation of the unsigned 64 bit long from the
String . |
static long |
parseUnsignedLongHex(CharSequence s,
int start,
int len,
boolean lowerCaseOnly)
Parse the hex representation of the unsigned 64 bit long from the
String . |
static String |
toHexStringPadded(long id,
int size) |
static String |
toHexStringPadded(long highOrderBits,
long lowOrderBits,
int size) |
public static long parseUnsignedLongHex(CharSequence s) throws NumberFormatException
String
.s
- String in hexadecimal of unsigned 64-bits long.NumberFormatException
public static long parseUnsignedLongHex(CharSequence s, int start, int len, boolean lowerCaseOnly) throws NumberFormatException
String
.s
- String in hex of unsigned 64 bitsstart
- the start index of the hex valuelen
- the len of the hex valuelowerCaseOnly
- if the allowed hex characters are lower case onlyNumberFormatException
public static long parseUnsignedLong(String s) throws NumberFormatException
NumberFormatException
public static NumberFormatException numberFormatOutOfLongRange(CharSequence s)
NumberFormatException
with a consistent error message.s
- the String
that exceeds the range of a Long
public static String toHexStringPadded(long id, int size)
public static String toHexStringPadded(long highOrderBits, long lowOrderBits, int size)