public static byte [ ] readResourceBytes ( String resourceName ) { InputStream is = Util . class . getResourceAsStream ( resourceName ) ; try { return bytes ( is ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } finally { closeQuietly ( is ) ; } }
Reads contents of resource fully into a byte array .