Package cn.webwheel.template

Examples of cn.webwheel.template.FileVisitor


            }
        }
        if (ri == null) {
            ri = new RendererInfo();
            final RendererInfo finalRi = ri;
            FileVisitor fv = new FileVisitor() {
                @Override
                public String read(File root, String file, String charset) throws IOException {
                    finalRi.files.add(new File(root, file));
                    return super.read(root, file, charset);
                }
View Full Code Here


    }

    private void renderResource(HttpExchange httpExchange, String resource, Map<String, Object> ctx) throws Exception {
        byte[] data;
        if (ctx != null) {
            TemplateRenderer renderer = rendererFactory.create(resource, new FileVisitor() {
                @Override
                public String read(File root, String file, String charset) throws IOException {
                    InputStreamReader reader = new InputStreamReader(getClass().getResourceAsStream(file), "utf-8");
                    try {
                        StringBuilder sb = new StringBuilder();
View Full Code Here

TOP

Related Classes of cn.webwheel.template.FileVisitor

Copyright © 2018 www.massapicom. 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.