public final class EncodingUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte |
byteFromBase16String(CharSequence chars,
int offset)
Decodes the specified two character sequence, and returns the resulting
byte. |
static void |
byteToBase16(byte value,
char[] dest,
int destOffset) |
static String |
fromLong(long id)
Converts long into string.
|
static String |
fromLongs(long idHigh,
long idLow)
Converts longs into string.
|
static long[] |
fromString(CharSequence chars)
Returns the
long value. |
static boolean |
isValidBase16String(CharSequence value)
Checks if string is valid base16.
|
static long |
longFromBase16String(CharSequence chars)
Returns the
long value whose base16 representation is stored in the first
16 chars of chars starting from the offset. |
static void |
longToBase16String(long value,
char[] dest,
int destOffset) |
public static long[] fromString(CharSequence chars)
long value.chars - the base8 or base16 representation of the long.public static long longFromBase16String(CharSequence chars)
long value whose base16 representation is stored in the first
16 chars of chars starting from the offset.chars - the base16 representation of the long.public static byte byteFromBase16String(CharSequence chars, int offset)
byte.chars - the character sequence to be decoded.offset - the starting offset in the CharSequence.byteIllegalArgumentException - if the input is not a valid encoded string
according to this encoding.public static boolean isValidBase16String(CharSequence value)
value - to checktrue if valid base16 stringpublic static String fromLong(long id)
id - 64 bitpublic static String fromLongs(long idHigh, long idLow)
idHigh - - trace id high partidLow - - trace id low partpublic static void longToBase16String(long value,
char[] dest,
int destOffset)
public static void byteToBase16(byte value,
char[] dest,
int destOffset)
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.