Thanks for commenting on the issue. The close on the file object seems a good idea in general but for me it won't do the trick. The Apache VFS API does provide for close operations but they serve a slightly different purpose.
VFS uses a stream based API to write; three objects are involved, a FileObject, a FileContent and an OutputStream ( to write you'd have to do fileObject.getFileContent().getOutputStream() ). Close on FileObject means you're done treating the file, which is different from meaning that you're done writing to it. The same goes for close on FileContent, which is supposed to release all resources and closes InputStreams as well. Only close on the OutputStream only means that all data is transferred. For information, internally in VFS operations, e.g. on a copy operation, the close is only called on the outputstream too. My point is that a close on the FileObject is not what I'm looking for; it is rather the handling of exceptions on close of the stream that concern me. I doubt it is really necessary to ignore exceptions on the close of the stream. I can imagine it was done because the close is called in a finally block and handling exceptions there is rather ugly. By doing the close before the finally the exceptions can be handled normally. It would do a double close on the same stream, but streams are supposed to support that kind of thing. Best regards, Frank _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
