Java provides an interface (since 1.5) for marking objects as being 'closeable', which enables some nice library functions like IOUtils.closeQuietly(..). It would be nice if the QueryIterator interface extended this interface, which has the single method definition:
public void close() throws IOException
Then, I can write methods which deal generically with iterators, and say something like:
if( it instanceof Closeable ) { IOUtils.closeQuietly( (Closeable) it ); }
Fixed in HEAD.