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;
    }
public static long computePosition(
        final int activeTermId, final int termOffset, final int positionBitsToShift, final int initialTermId)
    {
        final long termCount = activeTermId - initialTermId; 

        return (termCount << positionBitsToShift) + termOffset;
    }
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.

@param activeTermId        active term id.
@param termOffset          in the term.
@param positionBitsToShift number of times to left shift the term count
@param initialTermId       the initial term id that this stream started on
@return the absolute position in bytes
Compute the current position in absolute number of bytes .