code: public static long hexToLong(final String src, final int srcPos, final long dstInit, final int dstPos,
              final int nHex) {
          if (0 == nHex) {
              return dstInit;
          }
          if ((nHex - 1) * 4 + dstPos >= 64) {
              throw new IllegalArgumentException("(nHexs-1)*4+dstPos is greater or equal to than 64");
          }
          long out = dstInit;
          for (int i = 0; i < nHex; i++) {
              final int shift = i * 4 + dstPos;
              final long bits = (0xfL & hexDigitToInt(src.charAt(i + srcPos))) << shift;
              final long mask = 0xfL << shift;
              out = (out & ~mask) | bits;
          }
          return out;
      }
docs: <p>
  Converts an array of Char into a long using the default (little endian, Lsb0) byte and
  bit ordering.
  </p>
  
  @param src the hex string to convert
  @param srcPos the position in {@code src}, in Char unit, from where to start the
  conversion
  @param dstInit initial value of the destination long
  @param dstPos the position of the lsb, in bits, in the result long
  @param nHex the number of Chars to convert
  @return a long containing the selected bits
  @throws IllegalArgumentException if {@code (nHexs-1)*4+dstPos >= 64}