Skip to content

Instantly share code, notes, and snippets.

@heslei
Created July 24, 2013 17:29
Show Gist options
  • Select an option

  • Save heslei/6072655 to your computer and use it in GitHub Desktop.

Select an option

Save heslei/6072655 to your computer and use it in GitHub Desktop.
Using Scanner in order to read a file.
FileInputStream fis = new FileInputStream(this.getClass().getResource("/test.html").getFile());
String inputStreamString = new Scanner(fis,"UTF-8").useDelimiter("\\A").next();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment