Skip to content

Instantly share code, notes, and snippets.

@pivotaljohn
Last active November 26, 2015 00:49
Show Gist options
  • Save pivotaljohn/498d0573a99023746466 to your computer and use it in GitHub Desktop.
Save pivotaljohn/498d0573a99023746466 to your computer and use it in GitHub Desktop.
Idiom: Load a text file as a resource into a String.
String contentsOfFile = Resources.toString(Resources.getResource("path/to/resource"), Charsets.UTF_8);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment