RFR (JDK11/NIO) 8201276: (fs) Add methods to Files for reading/writing a string from/to a file

Hamlin Li huaming.li at oracle.com
Sat Apr 28 07:35:22 UTC 2018

Hi Joe,

just a minor comment about the test in ReadWriteString.java.

For both testMalformedWrite and testMalformedRead, temp files are not 
deleted, as Files.deleteIfExists(path); is skipped by the expected 
IOException. File.deleteOnExit​() may help.

Thank you


On 27/04/2018 12:50 PM, Joe Wang wrote:
> Hi,
> We're looking into adding methods to Files to read a file into a 
> String/write a String to a file. Below is the current proposal. Please 
> review.
> JBS: https://bugs.openjdk.java.net/browse/JDK-8201276
> webrev: http://cr.openjdk.java.net/~joehw/jdk11/8201276/webrev/
> specdiff: 
> http://cr.openjdk.java.net/~joehw/jdk11/8201276/specdiff/java/nio/file/Files.html
> Thanks,
> Joe

More information about the core-libs-dev mailing list