You can use readAllLines and the join method to get whole file content in one line:
String str = String.join("\n",Files.readAllLines(Paths.get("e:\\text.txt")));
Also, you can use readAllBytes:
String str = new String(Files.readAllBytes(Paths.get("e:\\text.txt")), StandardCharsets.UTF_8);
I think readAllBytes is faster and more precise because it does not replace a new line with \n and also new line may be \r\n. It is depending on your needs which one is suitable.