Class 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.
    • Constructor Detail

      • Pack200PackerAdapter

        public Pack200PackerAdapter()
    • Method Detail

      • firePropertyChange

        protected void firePropertyChange​(java.lang.String propertyName,
                                          java.lang.Object oldValue,
                                          java.lang.Object newValue)
                                   throws java.io.IOException
        Description copied from class: Pack200Adapter
        Reports a property update to listeners
        Overrides:
        firePropertyChange in class Pack200Adapter
        Parameters:
        propertyName - name of property being updated
        oldValue - old property value
        newValue - 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.IOException
        Description copied from interface: Pack200.Packer
        Packs the specified JAR file to the specified output stream.
        Specified by:
        pack in interface Pack200.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.IOException
        Description copied from interface: Pack200.Packer
        Packs the data from the specified jar input stream to the specified output stream.
        Specified by:
        pack in interface Pack200.Packer
        Parameters:
        in - stream of uncompressed JAR data.
        out - stream of compressed data.
        Throws:
        java.io.IOException - if I/O exception occurs.