Interface Pack200.Packer

  • Enclosing class:
    Pack200

    public static interface Pack200.Packer
    The interface defining the API for converting a JAR file to an output stream in the Pack200 format.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CLASS_ATTRIBUTE_PFX
      the format of a class attribute name.
      static java.lang.String CODE_ATTRIBUTE_PFX
      the format of a code attribute name.
      static java.lang.String DEFLATE_HINT
      the deflation hint to set in the output archive.
      static java.lang.String EFFORT
      the indicated amount of effort to use in compressing the archive.
      static java.lang.String ERROR
      a String representation for error.
      static java.lang.String FALSE
      a String representation of false.
      static java.lang.String FIELD_ATTRIBUTE_PFX
      the format of a field attribute name.
      static java.lang.String KEEP
      a String representation for keep.
      static java.lang.String KEEP_FILE_ORDER
      decide if all elements shall transmit in their original order.
      static java.lang.String LATEST
      a String representation for latest.
      static java.lang.String METHOD_ATTRIBUTE_PFX
      the format of a method attribute name.
      static java.lang.String MODIFICATION_TIME
      if it shall attempt to determine the latest modification time if this is set to LATEST.
      static java.lang.String PASS
      a String representation of pass.
      static java.lang.String PASS_FILE_PFX
      the file that will not be compressed.
      static java.lang.String PROGRESS
      packer progress as a percentage.
      static java.lang.String SEGMENT_LIMIT
      The number of bytes of each archive segment.
      static java.lang.String STRIP
      a String representation of strip.
      static java.lang.String TRUE
      a String representation of true.
      static java.lang.String UNKNOWN_ATTRIBUTE
      the action to take if an unknown attribute is encountered.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
      add a listener for PropertyChange events
      void pack​(java.util.jar.JarFile in, java.io.OutputStream out)
      Pack the specified JAR file to the specified output stream.
      void pack​(java.util.jar.JarInputStream in, java.io.OutputStream out)
      Pack the data from the specified jar input stream to the specified output stream.
      java.util.SortedMap<java.lang.String,​java.lang.String> properties()
      Returns a sorted map of the properties of this packer.
      void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
      remove a listener
    • Field Detail

      • CLASS_ATTRIBUTE_PFX

        static final java.lang.String CLASS_ATTRIBUTE_PFX
        the format of a class attribute name.
        See Also:
        Constant Field Values
      • CODE_ATTRIBUTE_PFX

        static final java.lang.String CODE_ATTRIBUTE_PFX
        the format of a code attribute name.
        See Also:
        Constant Field Values
      • DEFLATE_HINT

        static final java.lang.String DEFLATE_HINT
        the deflation hint to set in the output archive.
        See Also:
        Constant Field Values
      • EFFORT

        static final java.lang.String EFFORT
        the indicated amount of effort to use in compressing the archive.
        See Also:
        Constant Field Values
      • ERROR

        static final java.lang.String ERROR
        a String representation for error.
        See Also:
        Constant Field Values
      • FALSE

        static final java.lang.String FALSE
        a String representation of false.
        See Also:
        Constant Field Values
      • FIELD_ATTRIBUTE_PFX

        static final java.lang.String FIELD_ATTRIBUTE_PFX
        the format of a field attribute name.
        See Also:
        Constant Field Values
      • KEEP

        static final java.lang.String KEEP
        a String representation for keep.
        See Also:
        Constant Field Values
      • KEEP_FILE_ORDER

        static final java.lang.String KEEP_FILE_ORDER
        decide if all elements shall transmit in their original order.
        See Also:
        Constant Field Values
      • LATEST

        static final java.lang.String LATEST
        a String representation for latest.
        See Also:
        Constant Field Values
      • METHOD_ATTRIBUTE_PFX

        static final java.lang.String METHOD_ATTRIBUTE_PFX
        the format of a method attribute name.
        See Also:
        Constant Field Values
      • MODIFICATION_TIME

        static final java.lang.String MODIFICATION_TIME
        if it shall attempt to determine the latest modification time if this is set to LATEST.
        See Also:
        Constant Field Values
      • PASS

        static final java.lang.String PASS
        a String representation of pass.
        See Also:
        Constant Field Values
      • PASS_FILE_PFX

        static final java.lang.String PASS_FILE_PFX
        the file that will not be compressed.
        See Also:
        Constant Field Values
      • PROGRESS

        static final java.lang.String PROGRESS
        packer progress as a percentage.
        See Also:
        Constant Field Values
      • SEGMENT_LIMIT

        static final java.lang.String SEGMENT_LIMIT
        The number of bytes of each archive segment.
        See Also:
        Constant Field Values
      • STRIP

        static final java.lang.String STRIP
        a String representation of strip.
        See Also:
        Constant Field Values
      • TRUE

        static final java.lang.String TRUE
        a String representation of true.
        See Also:
        Constant Field Values
      • UNKNOWN_ATTRIBUTE

        static final java.lang.String UNKNOWN_ATTRIBUTE
        the action to take if an unknown attribute is encountered.
        See Also:
        Constant Field Values
    • Method Detail

      • properties

        java.util.SortedMap<java.lang.String,​java.lang.String> properties()
        Returns a sorted map of the properties of this packer.
        Returns:
        the properties of the packer.
      • pack

        void pack​(java.util.jar.JarFile in,
                  java.io.OutputStream out)
           throws java.io.IOException
        Pack the specified JAR file to the specified output stream.
        Parameters:
        in - JAR file to be compressed.
        out - stream of compressed data.
        Throws:
        java.io.IOException - if I/O exception occurs.
      • pack

        void pack​(java.util.jar.JarInputStream in,
                  java.io.OutputStream out)
           throws java.io.IOException
        Pack the data from the specified jar input stream to the specified output stream.
        Parameters:
        in - stream of uncompressed JAR data.
        out - stream of compressed data.
        Throws:
        java.io.IOException - if I/O exception occurs.
      • addPropertyChangeListener

        void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
        add a listener for PropertyChange events
        Parameters:
        listener - the listener to listen if PropertyChange events occurs
      • removePropertyChangeListener

        void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)
        remove a listener
        Parameters:
        listener - listener to remove