Class Base16EncodingUtils
java.lang.Object
io.opentelemetry.api.impl.Base16EncodingUtils
Base16 encoding and decoding utilities.
This class is not intended for use by application developers. Its API is stable and will not be changed or removed in a backwards-incompatible manner.
- Since:
- 1.68.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]bytesFromBase16(CharSequence value, int length) Returns thebyte[]decoded from the given hexCharSequence.static voidbytesFromBase16(CharSequence value, int length, byte[] bytes) Fillsbyteswith bytes decoded from the given hexCharSequence.static booleanisValidBase16String(CharSequence value) Returns whether theCharSequenceis a valid hex string.static longlongFromBase16String(CharSequence chars, int offset) Returns thelongvalue whose base16 representation is stored in the first 16 chars ofcharsstarting from theoffset.static voidlongToBase16String(long value, char[] dest, int destOffset) Appends the base16 encoding of the specifiedvalueto thedest.
-
Method Details
-
longFromBase16String
Returns thelongvalue whose base16 representation is stored in the first 16 chars ofcharsstarting from theoffset.- Parameters:
chars- the base16 representation of thelong.offset- the starting offset in theCharSequence.
-
longToBase16String
public static void longToBase16String(long value, char[] dest, int destOffset) Appends the base16 encoding of the specifiedvalueto thedest.- Parameters:
value- the value to be converted.dest- the destination char array.destOffset- the starting offset in the destination char array.
-
bytesFromBase16
Returns thebyte[]decoded from the given hexCharSequence. -
bytesFromBase16
Fillsbyteswith bytes decoded from the given hexCharSequence. -
isValidBase16String
Returns whether theCharSequenceis a valid hex string.
-