protected int countEntireIndexRange ( int indexOffset ) { // Go to the beginning of the index seek ( indexOffset ) ; // Read the count field int count = getCard16 ( ) ; // If count==0 -> size=2 if ( count == 0 ) return 2 ; else { // Read the offsize field int indexOffSize = getCard8 ( ) ; // Go to the last element of the offset array seek ( indexOffset + 2 + 1 + count * indexOffSize ) ; // The size of the object array is the value of the last element-1 int size = getOffset ( indexOffSize ) - 1 ; // Return the size of the entire index return 2 + 1 + ( count + 1 ) * indexOffSize + size ; } }
Function computes the size of an index