Class CompressionMethod


  • public class CompressionMethod
    extends Object
    Enumerated type for GZip supported compression methods. Converted from JHOVE 2.
    • Field Detail

      • DEFLATE

        public static final CompressionMethod DEFLATE
        The deflate compression method.
      • value

        public final int value
        The integer value for the enum instance.
      • label

        public final String label
        The value description.
      • valid

        public final boolean valid
        Whether the value is valid.
    • Constructor Detail

      • CompressionMethod

        protected CompressionMethod​(int value,
                                    String label,
                                    boolean valid)
        Constructor.
        Parameters:
        value - The compression method value.
        label - The name of the compression method.
        valid - If it is a valid compression method.
    • Method Detail

      • fromValue

        public static CompressionMethod fromValue​(int n)
        Returns the enumerated value object corresponding to the specified integer value. If the integer value is unknown, an instance marked as not valid is returned.
        Parameters:
        n - the integer value to map.
        Returns:
        a compression method object, valid if n is one of the defined valid values.