org.archive.util.iterator.CloseableIteratorUtil Maven / Gradle / Ivy
package org.archive.util.iterator;
import java.io.IOException;
import java.util.Iterator;
public class CloseableIteratorUtil {
public static void attemptClose(Iterator i) throws IOException {
if(i instanceof CloseableIterator) {
((CloseableIterator) i).close();
}
}
}