private boolean isLeafPage(ByteBuffer buffer) throws IOException {
  byte pageType=buffer.get(0);
  if (pageType == PageTypes.INDEX_LEAF) {
    return true;
  }
 else   if (pageType == PageTypes.INDEX_NODE) {
    return false;
  }
  throw new IOException(withErrorContext("Unexpected page type " + pageType));
}

private boolean isLeafPage ( ByteBuffer buffer ) throws IOException { byte pageType = buffer . get ( 0 ) ; if ( pageType == PageTypes . INDEX_LEAF ) { return true ; } else if ( pageType == PageTypes . INDEX_NODE ) { return false ; } throw new IOException ( withErrorContext ( "Unexpected page type " + pageType ) ) ; }
determines if the given index page is a leaf or node page .
