Class CompressionMethod
- java.lang.Object
-
- edu.harvard.hul.ois.jhove.module.gzip.CompressionMethod
-
public class CompressionMethod extends Object
Enumerated type for GZip supported compression methods. Converted from JHOVE 2.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompressionMethod(int value, String label, boolean valid)Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompressionMethodfromValue(int n)Returns the enumerated value object corresponding to the specified integer value.
-
-
-
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
nis one of the defined valid values.
-
-