Examples of ZipArchiver


Examples of org.codehaus.plexus.archiver.zip.ZipArchiver

            throw new MojoExecutionException( "Unable to copy hardcoded mimetype file", e );
        }

        try
        {
            ZipArchiver zipArchiver = (ZipArchiver)archiverManager.getArchiver("zip");
            zipArchiver.addDirectory(targetDirectory);
            zipArchiver.setCompress( true ); // seems to not be a problem to have mimetype compressed
            zipArchiver.setDestFile( new File(targetDirectory.getParentFile(), result.getName())); // copy it to parent dir
            zipArchiver.createArchive(  );

            getLog(  ).debug( "epub file created at: " + zipArchiver.getDestFile(  ).getAbsolutePath(  ) );
        } catch ( Exception e )
        {
            throw new MojoExecutionException( "Unable to zip epub file", e );
        }
    }
View Full Code Here

Examples of org.meshcms.util.ZipArchiver

    } catch (FileNotFoundException ex) {
      sc.log("can't create stream on " + bakFile, ex);
      return false;
    }

    new ZipArchiver(dir, os).process();

    try {
      os.close();
    } catch (IOException ex) {
      sc.log("Can't close file " + bakFile, ex);
View Full Code Here

Examples of org.meshcms.util.ZipArchiver

      fileName = Utils.removeExtension(fileName);
    }

    response.setHeader("Content-Disposition", "attachment; filename=\"" +
        fileName + ".zip\"");
    new ZipArchiver(file, response.getOutputStream()).process();
  }
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.