Package freemarker.template

Examples of freemarker.template.Template.dump()


        File convertedFile = new File(dir, filename + ".canonical");
        config.setDirectoryForTemplateLoading(dir);
        Template template = config.getTemplate(filename);
        FileWriter output = new FileWriter(convertedFile);
        try {
            template.dump(output);
        } finally {
            output.close();
        }
    }
View Full Code Here


        if(t == null) {
            return true;
        }
        // check if the template is empty
        StringWriter sw = new StringWriter();
        t.dump(sw);
        // an empty template canonical form is "0\n".. weird!
        String templateText = sw.toString();
        return "".equals(templateText) || (defaultContent != null && defaultContent.equals(templateText));
    }
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.