public static long combineInts ( String high , String low ) throws NumberFormatException { int highInt = Integer . parseInt ( high ) ; int lowInt = Integer . parseInt ( low ) ; /* * Shift the high integer into the upper 32 bits and add the low * integer. However, since this is really a single set of bits split in * half, the low part cannot be treated as negative by itself. Since * Java has no unsigned types, the top half of the long created by * up-casting the lower integer must be zeroed out before it's added. */ return ( ( long ) highInt << 32 ) + ( lowInt & 0x00000000FFFFFFFF L ) ; }
Combine two numbers that represent the high and low bits of a 64 - bit number .