>Not sure if this is exactly what you're looking for, but have you >seen the AutoCloseInputStream [1] class?
No, I haven't, because IO does not use this itself. My suggestion is providing an interface and a convenience method, which an expression of this interface als argument. In this method opening and closing will be done. I think, this would be the natural way in java. When closures came, the client code will look short. I have explained this here: http://www.aformatik.de/blog/blog-post/2009/11/09/refactoring-snippet-closure.html Sorry, this is in german, but you could see the code, specially from the example "praktisches Beispiel". This is just the idea, closing has to be worked out. Sebastian Petzelberger --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org