public Object next() { if ( ! success ) { throw new NoSuchElementException(); } Object next = jdbmTuple.getKey(); try { prefetch(); } catch ( IOException e ) { throw new NoSuchElementException( "Failure on btree: " + e.getMessage() ); } return next; }
dupIterator = new BTreeIterator( tree, underlying.doAscendingScan() );
BTreeIterator( BTree tree, boolean doAscending ) throws NamingException { this.doAscending = doAscending; try { if ( doAscending ) { browser = tree.browse(); } else { browser = tree.browse( null ); } prefetch(); } catch ( IOException e ) { LdapNamingException lne = new LdapNamingException( "Failure on btree: " + e.getMessage(), ResultCodeEnum.OTHER ); lne.setRootCause( e ); throw lne; } }