public static long computePosition ( final int activeTermId , final int termOffset , final int positionBitsToShift , final int initialTermId ) { final long termCount = activeTermId - initialTermId ; // copes with negative activeTermId on rollover return ( termCount << positionBitsToShift ) + termOffset ; }
Compute the current position in absolute number of bytes .