public static Template fromFile(final Class<?> resourceRoot, final String fileName) {
        InputStream templateStream = resourceRoot.getResourceAsStream(fileName);
        if(templateStream == null) {
            throw new IllegalArgumentException("Template file of the name: \'"+fileName+"\' was not found.");
        }
        return fromStream(templateStream);
    }
A single class templating library for doing runtime code-gen.

Not Threadsafe.
jctools-channels/src/main/java/org/jctools/util/Template.java