public ContentBuilder < P > fromResource ( String name ) { try ( InputStream content = ContentBuilder . class . getResourceAsStream ( name ) ) { return as ( content ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( "Failed to read resource: " + name , e ) ; } }
Sets the content from a named resource .