Package com.dotcms.repackage.org.apache.commons.compress.archivers.tar

Examples of com.dotcms.repackage.org.apache.commons.compress.archivers.tar.TarArchiveOutputStream


  {
    Logger.info(PushUtils.class, "Compressing "+files.size() + " to "+output.getAbsoluteFile());
                 // Create the output stream for the output file
    FileOutputStream fos = new FileOutputStream(output);
                 // Wrap the output file stream in streams that will tar and gzip everything
    TarArchiveOutputStream taos = new TarArchiveOutputStream(
      new GZIPOutputStream(new BufferedOutputStream(fos)));

                 // TAR originally didn't support long file names, so enable the support for it
    taos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);

                 // Get to putting all the files in the compressed output file
    for (File f : files) {
      addFilesToCompression(taos, f, ".", bundleRoot);
    }

                 // Close everything up
    taos.close();
    fos.close();
    return output;
  }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.commons.compress.archivers.tar.TarArchiveOutputStream

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.