public boolean hasNext() { while ((chunk == null || index == chunk.length) && src.hasNext()) { // fetch and filter another chunk. chunk = filter.filterChunk(src.nextChunk()); // reset the index into the current chunk. index = 0; } if (chunk == null || index == chunk.length) { // nothing left. return false; } return true; }
public boolean hasNext() { while ((chunk == null || index == chunk.length) && src.hasNext()) { // fetch and filter another chunk. chunk = filter.filterChunk(src.nextChunk()); // reset the index into the current chunk. index = 0; } if (chunk == null || index == chunk.length) { // nothing left. return false; } return true; }