Skip to content

Instantly share code, notes, and snippets.

@jonashackt
Created April 28, 2015 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonashackt/fffd9a55fe020a7756f9 to your computer and use it in GitHub Desktop.
Save jonashackt/fffd9a55fe020a7756f9 to your computer and use it in GitHub Desktop.
Read Files Java 8
String requestFolder = "requests/";
String file;
URI filepathUrl = this.getClass().getClassLoader().getResource(requestFolder + fileName).toURI();
Path filepath = Paths.get(filepathUrl);
file = Files.lines(filepath).collect(Collectors.joining());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment