Class Archive
- java.lang.Object
-
- org.apache.commons.compress.harmony.pack200.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, thenpack()
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 outputArchive(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
-
-
-
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
- TODOoutputStream
- TODOoptions
- - 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 fileoutputStream
- TODOoptions
- - packing options (if null then defaults are used)- Throws:
java.io.IOException
- If an I/O error occurs.
-
-
Method Detail
-
pack
public void pack() throws Pack200Exception, java.io.IOException
Pack the archive- Throws:
Pack200Exception
- TODOjava.io.IOException
- If an I/O error occurs.
-
-