Class PackingOptions


  • public class PackingOptions
    extends java.lang.Object
    Manages the various options available for pack200.
    • Method Detail

      • addClassAttributeAction

        public void addClassAttributeAction​(java.lang.String attributeName,
                                            java.lang.String action)
      • addCodeAttributeAction

        public void addCodeAttributeAction​(java.lang.String attributeName,
                                           java.lang.String action)
      • addFieldAttributeAction

        public void addFieldAttributeAction​(java.lang.String attributeName,
                                            java.lang.String action)
      • addMethodAttributeAction

        public void addMethodAttributeAction​(java.lang.String attributeName,
                                             java.lang.String action)
      • addPassFile

        public void addPassFile​(java.lang.String passFileName)
        Tell the compressor to pass the file with the given name, or if the name is a directory name all files under that directory will be passed.
        Parameters:
        passFileName - the file name
      • getLogFile

        public java.lang.String getLogFile()
      • isGzip

        public boolean isGzip()
      • isPassFile

        public boolean isPassFile​(java.lang.String passFileName)
      • removePassFile

        public void removePassFile​(java.lang.String passFileName)
      • setDeflateHint

        public void setDeflateHint​(java.lang.String deflateHint)
      • setEffort

        public void setEffort​(int effort)
        Sets the compression effort level (0-9, equivalent to -E command line option)
        Parameters:
        effort - the compression effort level, 0-9.
      • setGzip

        public void setGzip​(boolean gzip)
      • setLogFile

        public void setLogFile​(java.lang.String logFile)
      • setQuiet

        public void setQuiet​(boolean quiet)
      • setSegmentLimit

        public void setSegmentLimit​(long segmentLimit)
        Sets the segment limit (equivalent to -S command line option)
        Parameters:
        segmentLimit - the limit in bytes
      • setStripDebug

        public void setStripDebug​(boolean stripDebug)
        Sets strip debug attributes. If true, all debug attributes (i.e. LineNumberTable, SourceFile, LocalVariableTable and LocalVariableTypeTable attributes) are stripped when reading the input class files and not included in the output archive.
        Parameters:
        stripDebug - If true, all debug attributes.
      • setUnknownAttributeAction

        public void setUnknownAttributeAction​(java.lang.String unknownAttributeAction)
        Sets the compressor behavior when an unknown attribute is encountered.
        Parameters:
        unknownAttributeAction - the action to perform
      • setVerbose

        public void setVerbose​(boolean verbose)