-
public class LongStringUtilsUtility class with common long decimal and hexadecimal parsing, and String creation methods.
-
-
Method Summary
Modifier and Type Method Description static longparseUnsignedLongHex(CharSequence s)Parse the hex representation of the unsigned 64 bit long from the {@code String}.static longparseUnsignedLongHex(CharSequence s, int start, int len, boolean lowerCaseOnly)Parse the hex representation of the unsigned 64 bit long from the {@code String}.static longparseUnsignedLong(String s)static NumberFormatExceptionnumberFormatOutOfLongRange(CharSequence s)Creates a {@code NumberFormatException}with a consistent error message.static StringtoHexStringPadded(long id, int size)static StringtoHexStringPadded(long highOrderBits, long lowOrderBits, int size)-
-
Method Detail
-
parseUnsignedLongHex
static long parseUnsignedLongHex(CharSequence s)
Parse the hex representation of the unsigned 64 bit long from the
{@code String}.- Parameters:
s- String in hexadecimal of unsigned 64-bits long.
-
parseUnsignedLongHex
static long parseUnsignedLongHex(CharSequence s, int start, int len, boolean lowerCaseOnly)
Parse the hex representation of the unsigned 64 bit long from the
{@code String}.- Parameters:
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 only
-
parseUnsignedLong
static long parseUnsignedLong(String s)
-
numberFormatOutOfLongRange
static NumberFormatException numberFormatOutOfLongRange(CharSequence s)
Creates a
{@code NumberFormatException}with a consistent error message.- Parameters:
s- the{@code String}that exceeds the range of a{@code Long}
-
toHexStringPadded
static String toHexStringPadded(long id, int size)
-
toHexStringPadded
static String toHexStringPadded(long highOrderBits, long lowOrderBits, int size)
-
-
-
-