Class EncodingUtils


  • @Immutable
    public final class EncodingUtils
    extends Object
    • Method Detail

      • longToBase16String

        public static void longToBase16String​(long value,
                                              char[] dest,
                                              int destOffset)
        Appends the base16 encoding of the specified value to the dest.
        Parameters:
        value - the value to be converted.
        dest - the destination char array.
        destOffset - the starting offset in the destination char array.
      • byteToBase16

        public static void byteToBase16​(byte value,
                                        char[] dest,
                                        int destOffset)
        Encodes the specified byte, and returns the encoded String.
        Parameters:
        value - the value to be converted.
        dest - the destination char array.
        destOffset - the starting offset in the destination char array.
      • isValidBase16String

        public static boolean isValidBase16String​(CharSequence value)
        Returns whether the CharSequence is a valid hex string.
      • isValidBase16Character

        public static boolean isValidBase16Character​(char b)
        Returns whether the given char is a valid hex character.