nds2.connection and nds2.connection_iterator should implement java.io.Closeable
The java.io.Closeable just states they have a close() method. Adding the interface to the class specification would allow the classes to be used in a try-resource block in java 1.7+ as java.io.Closeable inherits from java.lang.AutoCloseable.