blockIndex = Ext2Directory.this.translateToBlock( index ); blockOffset= Ext2Directory.this.translateToOffset( index );  try{  if(blockIndex != lastBlockIndex) { blockData = iNode.getDataBlock(blockIndex); lastBlockIndex = blockIndex; }   Ext2DirectoryRecord dr = new Ext2DirectoryRecord(blockData, blockOffset); index+=dr.getRecLen();   if(dr.getINodeNr()!=0) { current = dr; return true; } else { log.debug("FSEntryIterator.hasNext(): null inode"); current = null; noMoreEntries=true; return false; } }catch(IOException e) { return false; }
dr = new Ext2DirectoryRecord(data, index, index); index+=dr.getRecLen(); } while(dr.getINodeNr()==0);  current = dr; return true;
		public boolean hasNext() {			log.debug("FSEntryIterator.hasNext()");			if(noMoreEntries)				return false;						if(index>=iNode.getSize())				return false;							//read the inode number of the next entry:			blockIndex = Ext2Directory.this.translateToBlock( index );			blockOffset= Ext2Directory.this.translateToOffset( index );						try{				//read a new block if needed				if(blockIndex != lastBlockIndex) {					blockData = iNode.getDataBlock(blockIndex);					lastBlockIndex = blockIndex;				}							//get the next directory record				Ext2DirectoryRecord dr = new Ext2DirectoryRecord(blockData, blockOffset);				index+=dr.getRecLen();												//inode nr=0 means the end of the directory				if(dr.getINodeNr()!=0) {					current = dr;					return true;				}				else {					log.debug("FSEntryIterator.hasNext(): null inode");					current = null;					noMoreEntries=true;					return false;				}			}catch(IOException e) {				return false;			}		}