Package com.jeecms.common.util.Zipper

Examples of com.jeecms.common.util.Zipper.FileEntry


    response.setContentType("application/x-download;charset=UTF-8");
    response.addHeader("Content-disposition", "filename="
        + backName+".zip");
    for(String filename:names){
      File file=new File(realPathResolver.get(filename));
      fileEntrys.add(new FileEntry("", "", file));
    }
    try {
      // 模板一般都在windows下编辑,所以默认编码为GBK
      Zipper.zip(response.getOutputStream(), fileEntrys, "GBK");
    } catch (IOException e) {
View Full Code Here


  }

  public List<FileEntry> export(CmsSite site, String solution) {
    List<FileEntry> fileEntrys = new ArrayList<FileEntry>();
    File tpl = new File(realPathResolver.get(site.getTplPath()), solution);
    fileEntrys.add(new FileEntry("", "", tpl));
    File res = new File(realPathResolver.get(site.getResPath()), solution);
    if (res.exists()) {
      for (File r : res.listFiles()) {
        fileEntrys.add(new FileEntry(FrontUtils.RES_EXP, r));
      }
    }
    return fileEntrys;
  }
View Full Code Here

TOP

Related Classes of com.jeecms.common.util.Zipper.FileEntry

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.