Enum Class ZipOption

java.lang.Object
java.lang.Enum<ZipOption>
io.smallrye.common.io.archive.ZipOption
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:
  • Enum Constant Details

    • STORED

      public static final ZipOption STORED
      Store the entry without compression. The compressed and uncompressed sizes will be equal.
    • DEFLATED

      public static final ZipOption DEFLATED
      Compress the entry using the DEFLATE algorithm.
    • ZIP64

      public static final ZipOption 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

      public static ZipOption[] 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

      public static ZipOption valueOf(String name)
      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 name
      NullPointerException - if the argument is null