Package kala.compress.harmony.pack200
Class Pack200PackerAdapter
- java.lang.Object
-
- kala.compress.harmony.pack200.Pack200Adapter
-
- kala.compress.harmony.pack200.Pack200PackerAdapter
-
- All Implemented Interfaces:
Pack200.Packer
public class Pack200PackerAdapter extends Pack200Adapter implements Pack200.Packer
This class provides the binding between the standard Pack200 interface and the internal interface for (un)packing. As this uses generics for the SortedMap, this class must be compiled and run on a Java 1.5 system. However, Java 1.5 is not necessary to use the internal libraries for unpacking.
-
-
Field Summary
Fields Modifier and Type Field Description private PackingOptionsoptions-
Fields inherited from class kala.compress.harmony.pack200.Pack200Adapter
DEFAULT_BUFFER_SIZE
-
Fields inherited from interface kala.compress.java.util.jar.Pack200.Packer
CLASS_ATTRIBUTE_PFX, CODE_ATTRIBUTE_PFX, DEFLATE_HINT, EFFORT, ERROR, FALSE, FIELD_ATTRIBUTE_PFX, KEEP, KEEP_FILE_ORDER, LATEST, METHOD_ATTRIBUTE_PFX, MODIFICATION_TIME, PASS, PASS_FILE_PFX, PROGRESS, SEGMENT_LIMIT, STRIP, TRUE, UNKNOWN_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description Pack200PackerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfirePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)Reports a property update to listenersvoidpack(java.util.jar.JarFile file, java.io.OutputStream out)Packs the specified JAR file to the specified output stream.voidpack(java.util.jar.JarInputStream in, java.io.OutputStream out)Packs the data from the specified jar input stream to the specified output stream.-
Methods inherited from class kala.compress.harmony.pack200.Pack200Adapter
addPropertyChangeListener, completed, properties, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface kala.compress.java.util.jar.Pack200.Packer
addPropertyChangeListener, properties, removePropertyChangeListener
-
-
-
-
Field Detail
-
options
private final PackingOptions options
-
-
Method Detail
-
firePropertyChange
protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue) throws java.io.IOExceptionDescription copied from class:Pack200AdapterReports a property update to listeners- Overrides:
firePropertyChangein classPack200Adapter- Parameters:
propertyName- name of property being updatedoldValue- old property valuenewValue- new property value- Throws:
java.io.IOException- if the values cannot be parsed
-
pack
public void pack(java.util.jar.JarFile file, java.io.OutputStream out) throws java.io.IOExceptionDescription copied from interface:Pack200.PackerPacks the specified JAR file to the specified output stream.- Specified by:
packin interfacePack200.Packer- Parameters:
file- JAR file to be compressed.out- stream of compressed data.- Throws:
java.io.IOException- if I/O exception occurs.
-
pack
public void pack(java.util.jar.JarInputStream in, java.io.OutputStream out) throws java.io.IOExceptionDescription copied from interface:Pack200.PackerPacks the data from the specified jar input stream to the specified output stream.- Specified by:
packin interfacePack200.Packer- Parameters:
in- stream of uncompressed JAR data.out- stream of compressed data.- Throws:
java.io.IOException- if I/O exception occurs.
-
-