Added Closeable support for java 7.