Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to read file into List of Strings with Google Guava
public List<String> getFileAsListOfStringsGuava(String fileName) throws IOException {
InputStream input = this.getClass().getResourceAsStream("/" + fileName);
return CharStreams.readLines(new InputStreamReader(input, StandardCharsets.UTF_8));

This comment has been minimized.

Copy link
Owner Author

LenarBad commented Dec 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.