public class HexStringUtils extends Object
Modifier and Type | Method and Description |
---|---|
static NumberFormatException |
numberFormatOutOfLongRange(String s)
Creates a
NumberFormatException with a consistent error message. |
static long |
parseUnsignedLongHex(String s,
int start,
int len,
boolean lowerCaseOnly)
Parse the hex representation of the unsigned 64 bit long from the
String . |
public static long parseUnsignedLongHex(String 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 NumberFormatException numberFormatOutOfLongRange(String s)
NumberFormatException
with a consistent error message.s
- the String
that exceeds the range of a Long