- All Implemented Interfaces:
Serializable,Comparable<ZipOption>,Constable,OpenOption
@Experimental("Incubating archive API")
public enum ZipOption
extends Enum<ZipOption>
implements OpenOption
Options that control the behavior of archive creation.
These options may be specified at the builder level (as defaults) and/or per entry (as overrides).
Compression options (STORED, DEFLATED) are mutually exclusive.
If neither is specified, the default is DEFLATED.
A compression option given to an entry overrides the builder-level default.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
STORED
Store the entry without compression. The compressed and uncompressed sizes will be equal. -
DEFLATED
Compress the entry using the DEFLATE algorithm. -
ZIP64
Write ZIP64 extended information in local file headers and central directory entries. This must be used if any single entry may exceed 4 GB in compressed or uncompressed size.When this option is not specified, entries are written in standard ZIP format and an exception is thrown if any entry's size overflows the 32-bit size fields. The central directory and end-of-central-directory records will still use ZIP64 format when necessary (e.g., when the entry count exceeds 65534 or the central directory offset exceeds 4 GB), regardless of this option.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-