org.apache.commons.compress.harmony.pack200

## Class PackingOptions

- java.lang.Object
- - org.apache.commons.compress.harmony.pack200.PackingOptions

-     public class PackingOptions
      extends Object

  Utility class to manage the various options available for pack200

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ERROR`
    `static String` | `KEEP`
    `static String` | `PASS`
    `static String` | `STRIP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PackingOptions()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addClassAttributeAction(String attributeName, String action)`
    `void` | `addCodeAttributeAction(String attributeName, String action)`
    `void` | `addFieldAttributeAction(String attributeName, String action)`
    `void` | `addMethodAttributeAction(String attributeName, String action)`
    `void` | `addPassFile(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.
    `String` | `getDeflateHint()`
    `int` | `getEffort()`
    `String` | `getLogFile()`
    `String` | `getModificationTime()`
    `long` | `getSegmentLimit()`
    `String` | `getUnknownAttributeAction()`
    `org.objectweb.asm.Attribute[]` | `getUnknownAttributePrototypes()`
    `String` | `getUnknownClassAttributeAction(String type)`
    `String` | `getUnknownCodeAttributeAction(String type)`
    `String` | `getUnknownFieldAttributeAction(String type)`
    `String` | `getUnknownMethodAttributeAction(String type)`
    `boolean` | `isGzip()`
    `boolean` | `isKeepDeflateHint()`
    `boolean` | `isKeepFileOrder()`
    `boolean` | `isPassFile(String passFileName)`
    `boolean` | `isStripDebug()`
    `boolean` | `isVerbose()`
    `void` | `removePassFile(String passFileName)`
    `void` | `setDeflateHint(String deflateHint)`
    `void` | `setEffort(int effort)` Sets the compression effort level (0-9, equivalent to -E command line option)
    `void` | `setGzip(boolean gzip)`
    `void` | `setKeepFileOrder(boolean keepFileOrder)`
    `void` | `setLogFile(String logFile)`
    `void` | `setModificationTime(String modificationTime)`
    `void` | `setQuiet(boolean quiet)`
    `void` | `setSegmentLimit(long segmentLimit)` Set the segment limit (equivalent to -S command line option)
    `void` | `setStripDebug(boolean stripDebug)` Set strip debug attributes.
    `void` | `setUnknownAttributeAction(String unknownAttributeAction)` Tell the compressor what to do if an unknown attribute is encountered
    `void` | `setVerbose(boolean verbose)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### STRIP

          public static final String STRIP

      See Also:
        Constant Field Values

    - #### ERROR

          public static final String ERROR

      See Also:
        Constant Field Values

    - #### PASS

          public static final String PASS

      See Also:
        Constant Field Values

    - #### KEEP

          public static final String KEEP

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PackingOptions

          public PackingOptions()

  - ### Method Detail

    - #### isGzip

          public boolean isGzip()

    - #### setGzip

          public void setGzip(boolean gzip)

    - #### isStripDebug

          public boolean isStripDebug()

    - #### 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.

    - #### isKeepFileOrder

          public boolean isKeepFileOrder()

    - #### setKeepFileOrder

          public void setKeepFileOrder(boolean keepFileOrder)

    - #### getSegmentLimit

          public long getSegmentLimit()

    - #### setSegmentLimit

          public void setSegmentLimit(long segmentLimit)

      Set the segment limit (equivalent to -S command line option)
      Parameters:
        `segmentLimit` - - the limit in bytes

    - #### getEffort

          public int getEffort()

    - #### 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.

    - #### getDeflateHint

          public String getDeflateHint()

    - #### isKeepDeflateHint

          public boolean isKeepDeflateHint()

    - #### setDeflateHint

          public void setDeflateHint(String deflateHint)

    - #### getModificationTime

          public String getModificationTime()

    - #### setModificationTime

          public void setModificationTime(String modificationTime)

    - #### isPassFile

          public boolean isPassFile(String passFileName)

    - #### addPassFile

          public void addPassFile(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(String passFileName)

    - #### getUnknownAttributeAction

          public String getUnknownAttributeAction()

    - #### setUnknownAttributeAction

          public void setUnknownAttributeAction(String unknownAttributeAction)

      Tell the compressor what to do if an unknown attribute is encountered
      Parameters:
        `unknownAttributeAction` - - the action to perform

    - #### addClassAttributeAction

          public void addClassAttributeAction(String attributeName,
                                              String action)

    - #### addFieldAttributeAction

          public void addFieldAttributeAction(String attributeName,
                                              String action)

    - #### addMethodAttributeAction

          public void addMethodAttributeAction(String attributeName,
                                               String action)

    - #### addCodeAttributeAction

          public void addCodeAttributeAction(String attributeName,
                                             String action)

    - #### isVerbose

          public boolean isVerbose()

    - #### setVerbose

          public void setVerbose(boolean verbose)

    - #### setQuiet

          public void setQuiet(boolean quiet)

    - #### getLogFile

          public String getLogFile()

    - #### setLogFile

          public void setLogFile(String logFile)

    - #### getUnknownAttributePrototypes

          public org.objectweb.asm.Attribute[] getUnknownAttributePrototypes()

    - #### getUnknownClassAttributeAction

          public String getUnknownClassAttributeAction(String type)

    - #### getUnknownMethodAttributeAction

          public String getUnknownMethodAttributeAction(String type)

    - #### getUnknownFieldAttributeAction

          public String getUnknownFieldAttributeAction(String type)

    - #### getUnknownCodeAttributeAction

          public String getUnknownCodeAttributeAction(String type)

Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.