Class Hex


  • @Internal
    public class Hex
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static char[] DIGITS_LOWER
      Used to build output as hex.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Hex()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void encodeHex​(byte[] data, int dataOffset, int dataLen, char[] toDigits, char[] out, int outOffset)
      Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.
      static java.lang.String encodeHexString​(byte[] bytes)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DIGITS_LOWER

        private static final char[] DIGITS_LOWER
        Used to build output as hex.
    • Constructor Detail

      • Hex

        private Hex()
    • Method Detail

      • encodeHexString

        public static java.lang.String encodeHexString​(byte[] bytes)
      • encodeHex

        private static void encodeHex​(byte[] data,
                                      int dataOffset,
                                      int dataLen,
                                      char[] toDigits,
                                      char[] out,
                                      int outOffset)
        Converts an array of bytes into an array of characters representing the hexadecimal values of each byte in order.
        Parameters:
        data - a byte[] to convert to hex characters
        dataOffset - the position in data to start encoding from
        dataLen - the number of bytes from dataOffset to encode
        toDigits - the output alphabet (must contain at least 16 chars)
        out - a char[] which will hold the resultant appropriate characters from the alphabet.
        outOffset - the position within out at which to start writing the encoded characters.