Package org.infoglue.deliver.util

Examples of org.infoglue.deliver.util.CompressionHelper


  private void importFile(File file, String onlyLatestVersions, String standardReplacement, String replacements, ProcessBean processBean) throws Exception
  {
    Timer t = new Timer();
    processBean.setStatus(ProcessBean.RUNNING);
   
    CompressionHelper ch = new CompressionHelper();
    String extractFolder = CmsPropertyHandler.getDigitalAssetUploadPath() + File.separator + "ImportArchive_" + System.currentTimeMillis();
    logger.info("Extracting " + file.getPath() + " to " + extractFolder);
    File importFolder = new File(extractFolder);
    importFolder.mkdir();
    ch.unzip(file, importFolder);
   
    processBean.updateProcess("Unzip of archive took " + (t.getElapsedTime() / 1000) + " seconds");
   
    try
    {
View Full Code Here


          }
        }
     
      if(value != null && value instanceof byte[])
      {
          CompressionHelper compressionHelper = new CompressionHelper();
        value = compressionHelper.decompress((byte[])value);
      }
      getResponse().setContentType("text/plain");

      StringBuilder sb = new StringBuilder();
     
View Full Code Here

      //this.fileName = fileName + "_" + names + ".zip";
     
      try
      {
          ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(archiveFileSystemName + "_" + names + ".zip"));
        CompressionHelper ch = new CompressionHelper();
        ch.zipFolder(folderName, zos);
          zos.close();
         
          deleteFolder(new File(folderName));
      }
      catch(Exception e)
View Full Code Here

    {
        Element value = DocumentHelper.createElement("value");
        if(enableCompression )
        {
            Base64Encoder encoder = new Base64Encoder();
            CompressionHelper zip = new CompressionHelper();
            byte[] val = zip.compress(vo.getVersionValue());
            value.addCDATA(encoder.encode(val));
        }
        else
        {
          value.addCDATA(URLEncoder.encode(vo.getVersionValue(),"UTF-8"));
View Full Code Here

TOP

Related Classes of org.infoglue.deliver.util.CompressionHelper

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.