public static Control createPagedResultsRequestControl(final Class clazz,final int pageSize,final boolean critical){
  Control control=null;
  try {
    control=createRequestControl(clazz,new Class[]{int.class,boolean.class},new Object[]{new Integer(pageSize),Boolean.valueOf(critical)});
  }
 catch (  LdapException e) {
    LdapLogDebugUtils.generateDebug(LdapErrorCodes.ERR_10001_PAGED_RESULTS_CONTROL_CREATION,LOGGER);
  }
  if (control == null) {
    control=createRequestControl(clazz,new Class[]{int.class},new Object[]{new Integer(pageSize)});
  }
  if (control == null) {
    LdapExceptionUtils.generateErrorException(LdapErrorCodes.ERR_10001_PAGED_RESULTS_CONTROL_CREATION,LOGGER);
  }
  return control;
}

public static Control createPagedResultsRequestControl ( final Class clazz , final int pageSize , final boolean critical ) { Control control = null ; try { control = createRequestControl ( clazz , new Class [ ] { int . class , boolean . class } , new Object [ ] { new Integer ( pageSize ) , Boolean . valueOf ( critical ) } ) ; } catch ( LdapException e ) { LdapLogDebugUtils . generateDebug ( LdapErrorCodes . ERR_10001_PAGED_RESULTS_CONTROL_CREATION , LOGGER ) ; } if ( control == null ) { control = createRequestControl ( clazz , new Class [ ] { int . class } , new Object [ ] { new Integer ( pageSize ) } ) ; } if ( control == null ) { LdapExceptionUtils . generateErrorException ( LdapErrorCodes . ERR_10001_PAGED_RESULTS_CONTROL_CREATION , LOGGER ) ; } return control ; }
permite crear instancias de controles de resultados paginados para jdk 1 . 4 y 1 . 5
