private TableImpl readTable(String name,int pageNumber,int flags) throws IOException {
  TableImpl table=_tableCache.get(pageNumber);
  if (table != null) {
    return table;
  }
  ByteBuffer buffer=takeSharedBuffer();
  try {
    _pageChannel.readPage(buffer,pageNumber);
    byte pageType=buffer.get(0);
    if (pageType != PageTypes.TABLE_DEF) {
      throw new IOException(withErrorContext("Looking for " + name + " at page "+ pageNumber+ ", but page type is "+ pageType));
    }
    return _tableCache.put(new TableImpl(this,buffer,pageNumber,name,flags));
  }
  finally {
    releaseSharedBuffer(buffer);
  }
}

private TableImpl readTable ( String name , int pageNumber , int flags ) throws IOException { TableImpl table = _tableCache . get ( pageNumber ) ; if ( table != null ) { return table ; } ByteBuffer buffer = takeSharedBuffer ( ) ; try { _pageChannel . readPage ( buffer , pageNumber ) ; byte pageType = buffer . get ( 0 ) ; if ( pageType != PageTypes . TABLE_DEF ) { throw new IOException ( withErrorContext ( "Looking for " + name + " at page " + pageNumber + ", but page type is " + pageType ) ) ; } return _tableCache . put ( new TableImpl ( this , buffer , pageNumber , name , flags ) ) ; } finally { releaseSharedBuffer ( buffer ) ; } }
reads a table with the given name from the given pagenumber .
