public static String readResource ( String resourceName , String charset ) { InputStream is = Util . class . getResourceAsStream ( resourceName ) ; try { return read ( is , charset ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } finally { closeQuietly ( is ) ; } }
Reads contents of resource fully into a string .