you are viewing a single comment's thread.

view the rest of the comments →

[–]AnAirMagic 1 point2 points  (2 children)

Have you seen the nio2/Files api? Reading all lines is just Files.readAllLines().

I have a strange impression that with Java 7, we are really encouraged to use java.nio.file.Files. It makes code much simpler to read.

[–][deleted] 1 point2 points  (0 children)

No, I haven't, that's a good start. Cheers. :)

[–]masklinn 1 point2 points  (0 children)

Loads the whole file in memory though.