private void insertionSort ( int left , int right ) { for ( int p = left + 1 ; p <= right ; p ++ ) { byte [ ] tmpRange = ranges [ p ] ; String tmpFilename = filenames [ p ] ; int j ; for ( j = p ; j > left && KeyUtils . compareKey ( tmpRange , ranges [ j - 1 ] ) < 0 ; j -- ) { ranges [ j ] = ranges [ j - 1 ] ; filenames [ j ] = filenames [ j - 1 ] ; } ranges [ j ] = tmpRange ; filenames [ j ] = tmpFilename ; } }
Internal insertion sort routine for subarrays of ranges that is used by quicksort .