Package com.flaptor.hounder.crawler.modules

Examples of com.flaptor.hounder.crawler.modules.DocumentCacheItem


                ((Request)request).setHandled(true);
                return;
            }
            URL = URLDecoder.decode(URL, "UTF-8");
           
            DocumentCacheItem doc = multiCache.getItem(URL);
            if (doc != null) {
                response.setContentType(doc.getMimeType());
               
                if (doc.getMimeType().equals("text/html")) {
                    StringTemplate template = frameTemplate.getInstanceOf();
                    template.setAttribute("url", URL);
                    response.getOutputStream().write(template.toString().getBytes());
                }
                response.getOutputStream().write(doc.getContent());
            } else {
              StringTemplate template = notFoundTemplate.getInstanceOf();
                template.setAttribute("url", URL);
                response.getOutputStream().write(template.toString().getBytes());
//                response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

TOP

Related Classes of com.flaptor.hounder.crawler.modules.DocumentCacheItem

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.