Class PackingOptions


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

      • isGzip

        public boolean isGzip()
      • setGzip

        public void setGzip​(boolean gzip)
      • setStripDebug

        public void setStripDebug​(boolean stripDebug)
        Set 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.
      • setSegmentLimit

        public void setSegmentLimit​(long segmentLimit)
        Set the segment limit (equivalent to -S command line option)
        Parameters:
        segmentLimit - - the limit in bytes
      • 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.
      • setDeflateHint

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

        public boolean isPassFile​(java.lang.String passFileName)
      • 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
      • removePassFile

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

        public void setUnknownAttributeAction​(java.lang.String unknownAttributeAction)
        Tell the compressor what to do if an unknown attribute is encountered
        Parameters:
        unknownAttributeAction - - the action to perform
      • addClassAttributeAction

        public void addClassAttributeAction​(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)
      • addCodeAttributeAction

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

        public void setVerbose​(boolean verbose)
      • setQuiet

        public void setQuiet​(boolean quiet)
      • getLogFile

        public java.lang.String getLogFile()
      • setLogFile

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