File IO involves native code at some point.
It seems that native code which accesses a Java
array may involve copying the array (depending on the JVM) 
This can easily lead to an OutOfMemory condition if the array is large.
It would be useful to provide some utility methods to process the array in chunks of (say) 4K. It's unlikely that applications will use huge read buffers, but they may well need to write large buffers, so only output chunking is likely to be useful.
It might also be useful to create a ChunkedOutputStream/Writer which provides the chunking automatically.