Class Archive
java.lang.Object
org.apache.commons.compress.harmony.pack200.Archive
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
ConstructorDescriptionArchive
(JarFile jarFile, OutputStream outputStream, PackingOptions options) Creates an Archive with the given input file and a stream for the outputArchive
(JarInputStream inputStream, OutputStream outputStream, PackingOptions options) Creates an Archive with streams for the input and output. -
Method Summary
-
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 fileoutputStream
- TODOoptions
- 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
- TODOoutputStream
- TODOoptions
- packing options (if null then defaults are used)- Throws:
IOException
- If an I/O error occurs.
-
-
Method Details
-
pack
Packs the archive.- Throws:
Pack200Exception
- TODOIOException
- If an I/O error occurs.
-