public static long lowerHexToUnsignedLong ( String lowerHex , int index ) { long result = 0 ; for ( int endIndex = Math . min ( index + 16 , lowerHex . length ( ) ) ; index < endIndex ; index ++ ) { char c = lowerHex . charAt ( index ) ; result <<= 4 ; if ( c >= ' ' && c <= ' ' ) { result |= c - ' ' ; } else if ( c >= ' ' && c <= ' ' ) { result |= c - ' ' + 10 ; } else { throw isntLowerHexLong ( lowerHex ) ; } } return result ; }
Parses a 16 character lower - hex string with no prefix into an unsigned long starting at the spe index .