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);
    }
  }
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);
    }
  }
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.
@param name the name of the content resource to add
@return this builder
Sets the content from a named resource .