private long indexOf(final BTree ndx,final byte[] key){
  if (log.isTraceEnabled()) {
    log.trace(BytesUtil.toString(key));
  }
  final long indexOfKey=ndx.indexOf(key);
  if (log.isTraceEnabled()) {
    log.trace("result of indexOf(key): " + indexOfKey);
  }
  final long index;
  if (indexOfKey >= 0) {
    index=indexOfKey;
  }
 else {
    index=-(indexOfKey + 1);
  }
  if (log.isTraceEnabled()) {
    log.trace("index: " + index);
  }
  return index;
}

private long indexOf ( final BTree ndx , final byte [ ] key ) { if ( log . isTraceEnabled ( ) ) { log . trace ( BytesUtil . toString ( key ) ) ; } final long indexOfKey = ndx . indexOf ( key ) ; if ( log . isTraceEnabled ( ) ) { log . trace ( "result of indexOf(key): " + indexOfKey ) ; } final long index ; if ( indexOfKey >= 0 ) { index = indexOfKey ; } else { index = - ( indexOfKey + 1 ) ; } if ( log . isTraceEnabled ( ) ) { log . trace ( "index: " + index ) ; } return index ; }
use the index to find the index of the tuple for the specified key ( or the index of the next real tuple after the specified key ) .
