public void insertRecord(int id,byte[] record) throws IOException {
  if (!database.isOpen())   throw new IllegalStateException("don't access the table before opening the database");
  if (id < committedNextRowId)   throw new IllegalStateException("Trying to insert a row below nextRowId: " + id + ", this: "+ this);
  if (id != lastTransactionInsertId + 1)   throw new IllegalStateException("Trying to insert a row that is not one above the last transaction id: " + lastTransactionInsertId + ", id: "+ id);
  if (record.length != recordSize)   throw new IllegalStateException("Record is wrong size: " + record.length + ", this: "+ this);
  insertRecordOut.write(record);
  lastTransactionInsertId=id;
}

public void insertRecord ( int id , byte [ ] record ) throws IOException { if ( ! database . isOpen ( ) ) throw new IllegalStateException ( "don't access the table before opening the database" ) ; if ( id < committedNextRowId ) throw new IllegalStateException ( "Trying to insert a row below nextRowId: " + id + ", this: " + this ) ; if ( id != lastTransactionInsertId + 1 ) throw new IllegalStateException ( "Trying to insert a row that is not one above the last transaction id: " + lastTransactionInsertId + ", id: " + id ) ; if ( record . length != recordSize ) throw new IllegalStateException ( "Record is wrong size: " + record . length + ", this: " + this ) ; insertRecordOut . write ( record ) ; lastTransactionInsertId = id ; }
within a transaction , all inserts must be done in sequential order
