Package io.pack200

Class PackerImpl

    • Constructor Detail

      • PackerImpl

        public PackerImpl()
        Constructs a Packer object and sets the initial state of the packer engines.
    • Method Detail

      • properties

        public java.util.SortedMap<java.lang.String,​java.lang.String> properties()
        Get the set of options for the pack and unpack engines.
        Specified by:
        properties in interface Pack200.Packer
        Returns:
        A sorted association of option key strings to option values.
      • pack

        public void pack​(java.util.jar.JarFile in,
                         java.io.OutputStream out)
                  throws java.io.IOException
        Takes a JarFile and converts into a pack-stream.

        Closes its input but not its output. (Pack200 archives are appendable.)

        Specified by:
        pack in interface Pack200.Packer
        Parameters:
        in - a JarFile
        out - an OutputStream
        Throws:
        java.io.IOException - if an error is encountered.
      • pack

        public void pack​(java.util.jar.JarInputStream in,
                         java.io.OutputStream out)
                  throws java.io.IOException
        Takes a JarInputStream and converts into a pack-stream.

        Closes its input but not its output. (Pack200 archives are appendable.)

        The modification time and deflation hint attributes are not available, for the jar-manifest file and the directory containing the file.

        Specified by:
        pack in interface Pack200.Packer
        Parameters:
        in - a JarInputStream
        out - an OutputStream
        Throws:
        java.io.IOException - if an error is encountered.
        See Also:
        Pack200.Packer.MODIFICATION_TIME, Pack200.Packer.DEFLATE_HINT