I wonder why in the middle of 2022 people still put pre-2011 and pre-JDK7 snippets. And even try-with-resources example is not all what JDK7 provides, there are better, high-level utilities added which haven't got a proper attention.
Namely, in JDK7 and newer, you can just write: Files.readAllBytes(Path.get("story.txt"))