Jeremias Maerki wrote:
So what will happen if there's no FileChannel available (for example, in a servlet)? Will the AFP output stop working?
Of course there would have been provision for plain old OutputStream handling, this really goes without saying doesn't it?
In additional to what Max wrote (preserving compatibility with output targets that are not nio-compatible), I'd say that bit of potential performance improvement is totally irrelevant in the command-line after all the class loading and JIT. It might help in a server-environment, though. But did you make any measurements that indicate that the performance would indeed be considerably better? Or are you just guessing/hoping?
I was just plugging it in and testing it out on the command line, of course I appreciate there are other deployment environments... I was just looking for an improvement in the raw file writing speed. Anyway the new I/O offered no performance improvements so its all academic.