- java.lang.Object
-
- brave.internal.HexCodec
-
public final class HexCodec extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longlenientLowerHexToUnsignedLong(java.lang.CharSequence lowerHex, int index, int endIndex)LikelowerHexToUnsignedLong(CharSequence, int), but returns zero on invalid inputstatic longlowerHexToUnsignedLong(java.lang.CharSequence lowerHex)Parses a 1 to 32 character lower-hex string with no prefix into an unsigned long, tossing any bits higher than 64.static longlowerHexToUnsignedLong(java.lang.CharSequence lowerHex, int index)Parses a 16 character lower-hex string with no prefix into an unsigned long, starting at the specified index.static java.lang.StringtoLowerHex(long v)Inspired byokio.Buffer.writeLongstatic voidwriteHexLong(char[] data, int pos, long v)Inspired byokio.Buffer.writeLong
-
-
-
Method Detail
-
lowerHexToUnsignedLong
public static long lowerHexToUnsignedLong(java.lang.CharSequence lowerHex)
Parses a 1 to 32 character lower-hex string with no prefix into an unsigned long, tossing any bits higher than 64.
-
lowerHexToUnsignedLong
public static long lowerHexToUnsignedLong(java.lang.CharSequence lowerHex, int index)Parses a 16 character lower-hex string with no prefix into an unsigned long, starting at the specified index.
-
lenientLowerHexToUnsignedLong
public static long lenientLowerHexToUnsignedLong(java.lang.CharSequence lowerHex, int index, int endIndex)LikelowerHexToUnsignedLong(CharSequence, int), but returns zero on invalid input
-
toLowerHex
public static java.lang.String toLowerHex(long v)
Inspired byokio.Buffer.writeLong
-
writeHexLong
public static void writeHexLong(char[] data, int pos, long v)Inspired byokio.Buffer.writeLong
-
-