package eu.dnetlib.data.collective.harvest.provider; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.concurrent.BlockingQueue; import eu.dnetlib.data.collective.harvest.provider.DataProvider.FileType; public class TryFileWalker extends FileWalker { boolean cancel = false; public TryFileWalker(BlockingQueue queue, FileType type, File source) { super(queue, type, source); } @Override protected boolean handleIsCancelled(File file, int depth, @SuppressWarnings("rawtypes") Collection results) throws IOException { return cancel; } @Override protected void handleFile(File file, int depth, @SuppressWarnings("rawtypes") Collection results) throws IOException { super.handleFile(file, depth, results); cancel = true; } }