java.lang.Object
org.apache.commons.compress.harmony.pack200.Archive

public class Archive extends Object
Main entry point to pack200 and represents a packed archive. An archive is constructed with either a JarInputStream and an output stream or a JarFile as input and an OutputStream. Options can be set, then pack() is called, to pack the Jar file into a pack200 archive.
  • Constructor Details

    • Archive

      public Archive(JarFile jarFile, OutputStream outputStream, PackingOptions options) throws IOException
      Creates an Archive with the given input file and a stream for the output.
      Parameters:
      jarFile - the input file.
      outputStream - target output stream for the compressed data.
      options - packing options (if null then defaults are used).
      Throws:
      IOException - If an I/O error occurs.
    • Archive

      public Archive(JarInputStream inputStream, OutputStream outputStream, PackingOptions options) throws IOException
      Creates an Archive with streams for the input and output.
      Parameters:
      inputStream - input stream of uncompressed JAR data.
      outputStream - target output stream for the compressed data.
      options - packing options (if null then defaults are used).
      Throws:
      IOException - If an I/O error occurs.
  • Method Details