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)
IO.File.ReadAllText(FilePath)
new String(Files.readAllBytes(path));
or new String(Files.readAllBytes(path), StandardCharsets.UTF_8);
?