Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to read file into String with Apache Commons IO
public List<String> getFileAsListOfStrings(String fileName) throws IOException {
InputStream input = this.getClass().getResourceAsStream("/" + fileName);
return IOUtils.readLines(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.