3 ms·
Default Java File I/O is pretty horrible but like a lot of things about Java, the widely-used Apache Commons makes it better: String fileContents = FileUtils.r
by ShardPhoenix 16y ago
Default Java File I/O is pretty horrible but like a lot of things about Java, the widely-used Apache Commons makes it better:
String fileContents = FileUtils.readFileToString(new File("blah"));
Still not quite as concise as Ruby/Python/etc though.