public String getString ( String name ) { InputStream in = null ; if ( name == null ) throw new NullPointerException ( "name is null" ) ; try { if ( ( in = loader . getResourceAsStream ( prefix + name ) ) == null ) throw new ResourceException ( "Unable to find resource for " + name ) ; return IOUtils . toString ( in ) ; } catch ( IOException e ) { throw new ResourceException ( "IOException reading resource " + name , e ) ; } finally { Closer . close ( in , logger , "resource InputStream for " + name ) ; } }
Gets a resource as a String