public final class HexCodec extends Object
| Modifier and Type | Method | Description |
|---|---|---|
static long |
lowerHexToUnsignedLong(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 long |
lowerHexToUnsignedLong(CharSequence lowerHex,
int index) |
Parses a 16 character lower-hex string with no prefix into an unsigned long, starting at the
specified index.
|
static String |
toLowerHex(long v) |
Inspired by
okio.Buffer.writeLong |
static String |
toLowerHex(long high,
long low) |
Returns 16 or 32 character hex string depending on if
high is zero. |
static void |
writeHexByte(char[] data,
int pos,
byte b) |
|
static void |
writeHexLong(char[] data,
int pos,
long v) |
Inspired by
okio.Buffer.writeLong |
public static long lowerHexToUnsignedLong(CharSequence lowerHex)
public static long lowerHexToUnsignedLong(CharSequence lowerHex, int index)
public static String toLowerHex(long high, long low)
high is zero.public static String toLowerHex(long v)
okio.Buffer.writeLongpublic static void writeHexLong(char[] data,
int pos,
long v)
okio.Buffer.writeLongpublic static void writeHexByte(char[] data,
int pos,
byte b)
Copyright © 2017 OpenZipkin. All rights reserved.