Package io.pack200

Class PackerImpl

java.lang.Object
io.pack200.PackerImpl
All Implemented Interfaces:
Pack200.Packer

public class PackerImpl extends Object implements Pack200.Packer
  • Constructor Details

    • PackerImpl

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

    • properties

      public SortedMap<String,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(JarFile in, OutputStream out) throws 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:
      IOException - if an error is encountered.
    • pack

      public void pack(JarInputStream in, OutputStream out) throws 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:
      IOException - if an error is encountered.
      See Also: