Zip.Zip64ModeAttribute (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs, class: Zip, class: Zip64ModeAttribute

# Class Zip.Zip64ModeAttribute

java.lang.Object
org.apache.tools.ant.types.EnumeratedAttribute
org.apache.tools.ant.taskdefs.Zip.Zip64ModeAttribute

Enclosing class:
  `Zip`

public static final class Zip.Zip64ModeAttribute extends EnumeratedAttribute
The choices for Zip64 extensions.

never: never add any Zip64 extensions. This will cause the task to fail if you try to add entries bigger than 4GB or create an archive bigger than 4GB or holding more that 65535 entries.

as-needed: create Zip64 extensions only when the entry's size is bigger than 4GB or one of the archive limits is hit. This mode also adds partial Zip64 extensions for all deflated entries written by Ant.

always: create Zip64 extensions for all entries.

Note some ZIP implementations don't handle Zip64 extensions well and others may fail if the Zip64 extra field data is only present inside the local file header but not the central directory - which is what as-needed may result in. Java5 and Microsoft Visual Studio's Extension loader are known to fconsider the archive broken in such cases. If you are targeting such an archiver use the value never unless you know you need Zip64 extensions.

Since:
  Ant 1.9.1

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Zip.Zip64ModeAttribute`
  `AS_NEEDED`
  `static final Zip.Zip64ModeAttribute`
  `NEVER`

  ### Fields inherited from class EnumeratedAttribute

  `value`
  Modifier and Type
  Field
  Description
  `protected String`
  `value`
  The selected value in this enumeration.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Zip64ModeAttribute()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Zip64Mode`
  `getMode()`
  `String[]`
  `getValues()`
  This is the only method a subclass needs to implement.

  ### Methods inherited from class EnumeratedAttribute

  `containsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString`
  Modifier and Type
  Method
  Description
  `final boolean`
  `containsValue(String value)`
  Is this value included in the enumeration?
  `final int`
  `getIndex()`
  `static EnumeratedAttribute`
  `getInstance(Class<? extends EnumeratedAttribute> clazz, String value)`
  Factory method for instantiating EAs via API in a more developer friendly way.
  `final String`
  `getValue()`
  `final int`
  `indexOfValue(String value)`
  get the index of a value in this enumeration.
  `void`
  `setValue(String value)`
  Invoked by `IntrospectionHelper`.
  `String`
  `toString()`
  Convert the value to its string form.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### NEVER

    public static final Zip.Zip64ModeAttribute NEVER

  - ### AS_NEEDED

    public static final Zip.Zip64ModeAttribute AS_NEEDED

- ## Constructor Details

  - ### Zip64ModeAttribute

    public Zip64ModeAttribute()

- ## Method Details

  - ### getValues

    public String[] getValues()
    Description copied from class: `EnumeratedAttribute`
    This is the only method a subclass needs to implement.
    Specified by:
      `getValues` in class `EnumeratedAttribute`
    Returns:
      an array holding all possible values of the enumeration. The order of elements must be fixed so that `indexOfValue(String)` always return the same index for the same value.

  - ### getMode

    public Zip64Mode getMode()