Class Archive


  • public class Archive
    extends java.lang.Object
    Archive is the 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 Summary

      Constructors 
      Constructor Description
      Archive​(java.util.jar.JarFile jarFile, java.io.OutputStream outputStream, PackingOptions options)
      Creates an Archive with the given input file and a stream for the output
      Archive​(java.util.jar.JarInputStream inputStream, java.io.OutputStream outputStream, PackingOptions options)
      Creates an Archive with streams for the input and output.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void pack()
      Pack the archive
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Archive

        public Archive​(java.util.jar.JarInputStream inputStream,
                       java.io.OutputStream outputStream,
                       PackingOptions options)
                throws java.io.IOException
        Creates an Archive with streams for the input and output.
        Parameters:
        inputStream - TODO
        outputStream - TODO
        options - - packing options (if null then defaults are used)
        Throws:
        java.io.IOException - If an I/O error occurs.
      • Archive

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