@Override
public boolean hasNext() throws IOException {
while (curStat == null && itor.hasNext()) {
LocatedFileStatus next =itor.next();
next.makeQualified(DistributedFileSystem.this);
if (filter.accept(next.getPath())) {
curStat = next;
}
}
return curStat != null;