Hacker News new | ask | show | jobs
by cm2187 3626 days ago
I am not familiar enough with java which I assumed was a match for .net. But one line of code in .net.

IO.File.ReadAllText(FilePath)

1 comments

Yeah, .net is way nicer than java and your argument holds pretty well in that case.
What's wrong with

  new String(Files.readAllBytes(path));
or

  new String(Files.readAllBytes(path), StandardCharsets.UTF_8);

?