private void validatePageNumber(int pageNumber) throws IOException {
  int nextPageNumber=getNextPageNumber(_channel.size());
  if ((pageNumber <= INVALID_PAGE_NUMBER) || (pageNumber >= nextPageNumber)) {
    throw new IllegalStateException("invalid page number " + pageNumber);
  }
}

private void validatePageNumber ( int pageNumber ) throws IOException { int nextPageNumber = getNextPageNumber ( _channel . size ( ) ) ; if ( ( pageNumber <= INVALID_PAGE_NUMBER ) || ( pageNumber >= nextPageNumber ) ) { throw new IllegalStateException ( "invalid page number " + pageNumber ) ; } }
validates that the given pagenumber is valid for this database .
