Just like in Java, using CommonsIO library:
FileUtils.readFileToString(file, StandardCharsets.UTF_8)
Also, many answers here forget Charset. It's better to always provide it explicitly, or it will hit one day.
Just like in Java, using CommonsIO library:
FileUtils.readFileToString(file, StandardCharsets.UTF_8)
Also, many answers here forget Charset. It's better to always provide it explicitly, or it will hit one day.