private void load(ByteBuffer bb) throws BufferUnderflowException, MaryConfigurationException {
  int numIdx=bb.getInt();
  idxInterval=bb.getInt();
  if (idxInterval <= 0) {
    throw new MaryConfigurationException("read negative index interval -- file seems corrupt");
  }
  bytePtrs=new long[numIdx];
  timePtrs=new long[numIdx];
  for (int i=0; i < numIdx; i++) {
    bytePtrs[i]=bb.getLong();
    timePtrs[i]=bb.getLong();
    if (i > 0) {
      if (bytePtrs[i] < bytePtrs[i - 1] || timePtrs[i] < timePtrs[i - 1]) {
        throw new MaryConfigurationException("File seems corrupt: Pointer positions in index fields are not strictly monotonously rising");
      }
    }
  }
  bb.getLong();
  bb.getLong();
}

private void load ( ByteBuffer bb ) throws BufferUnderflowException , MaryConfigurationException { int numIdx = bb . getInt ( ) ; idxInterval = bb . getInt ( ) ; if ( idxInterval <= 0 ) { throw new MaryConfigurationException ( "read negative index interval -- file seems corrupt" ) ; } bytePtrs = new long [ numIdx ] ; timePtrs = new long [ numIdx ] ; for ( int i = 0 ; i < numIdx ; i ++ ) { bytePtrs [ i ] = bb . getLong ( ) ; timePtrs [ i ] = bb . getLong ( ) ; if ( i > 0 ) { if ( bytePtrs [ i ] < bytePtrs [ i - 1 ] || timePtrs [ i ] < timePtrs [ i - 1 ] ) { throw new MaryConfigurationException ( "File seems corrupt: Pointer positions in index fields are not strictly monotonously rising" ) ; } } } bb . getLong ( ) ; bb . getLong ( ) ; }
method which loads an index from a byte buffer .
