@Override public P readPage(int pageID){
  try {
    countRead();
    long offset=((long)(header.getReservedPages() + pageID)) * (long)pageSize;
    byte[] buffer=new byte[pageSize];
    file.seek(offset);
    file.read(buffer);
    return byteArrayToPage(buffer);
  }
 catch (  IOException e) {
    throw new RuntimeException("IOException occurred during reading of page " + pageID + "\n",e);
  }
}

@ Override public P readPage ( int pageID ) { try { countRead ( ) ; long offset = ( ( long ) ( header . getReservedPages ( ) + pageID ) ) * ( long ) pageSize ; byte [ ] buffer = new byte [ pageSize ] ; file . seek ( offset ) ; file . read ( buffer ) ; return byteArrayToPage ( buffer ) ; } catch ( IOException e ) { throw new RuntimeException ( "IOException occurred during reading of page " + pageID + "\n" , e ) ; } }
reads the page with the given id from this file .
