RFR [8020669] java.nio.file.Files.readAllBytes() does not read any data when Files.size() is 0

Alan Bateman Alan.Bateman at oracle.com
Sun Jul 28 23:43:26 UTC 2013

On 28/07/2013 15:08, Ivan Gerasimov wrote:
> Hello Alan and everyone else
> Thank you for review!
> Here's another version of webrev:
> http://cr.openjdk.java.net/~igerasim/8020669/5/webrev/ 
> <http://cr.openjdk.java.net/%7Eigerasim/8020669/5/webrev/>
Thanks for the updated the webrev, the expansion of the capacity is much 
nicer now. As regards whether to double or increase by BUFFER_SIZE then 
it's probably a coin toss. One could come up with cases where someone is 
using this method on a file that is extended by another entity. It would 
depend on the extend rate as to which approach would be more efficient 
(clearly such cases are going to be problematic as file locking should 
be used to coordinate the access).

As regards the comment on "Reads" vs "Read", that was more just I've 
wasn't sure if you had intended to include this or not.

So I'm happy to sponsor this for you (assuming we are done).


More information about the core-libs-dev mailing list