Package com.medallia.spider.StaticResources

Examples of com.medallia.spider.StaticResources.StaticResource.copyTo()


    if (staticResource != null) {
      if (staticResource.exists()) {
        res.setHeader("Content-Type", staticResource.getMimeType());
        res.setDateHeader("Date", boot.getTime());       
        HttpHeaders.addCacheForeverHeaders(res);
        staticResource.copyTo(res.getOutputStream());
      } else {
        res.sendError(404);
        log.warn("Requested resource not found: " + uri);
      }
      return true;
View Full Code Here


   
    if (sr != null) {
      // copy into buffer and calculate md5
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      try {
        sr.copyTo(buffer);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
     
      // create and return link
View Full Code Here

    if (staticResource != null) {
      if (staticResource.exists()) {
        res.setHeader("Content-Type", staticResource.getMimeType());
        res.setDateHeader("Date", boot.getTime());       
        HttpHeaders.addCacheForeverHeaders(res);
        staticResource.copyTo(res.getOutputStream());
      } else {
        res.sendError(404);
        log.warn("Requested resource not found: " + uri);
      }
      return true;
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.