Closing an asynchronous file channel can be very difficult. If you submitted I/O tasks to the asynchronous channel you want to be sure that the tasks are executed properly. This can actually be a…
Read the original here:
Java 7: Closing NIO.2 file channels without loosing data