Class CompressionType
- java.lang.Object
-
- edu.harvard.hul.ois.jhove.module.gzip.CompressionType
-
public class CompressionType extends Object
Enumerated type for GZip supported compression types (extra flags in GZip header).
-
-
Field Summary
Fields Modifier and Type Field Description static CompressionTypeFASTEST_ALGORITHMGZip extra flag value for fastest algorithm.StringlabelThe value description.static CompressionTypeMAXIMUM_COMPRESSIONGZip extra flag value for maximum compression.booleanvalidWhether the value is valid.intvalueThe integer value for the enum instance.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompressionType(int value, String label, boolean valid)Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompressionTypefromValue(int n)Returns the enumerated value object corresponding to the specified integer value.
-
-
-
Field Detail
-
MAXIMUM_COMPRESSION
public static final CompressionType MAXIMUM_COMPRESSION
GZip extra flag value for maximum compression.
-
FASTEST_ALGORITHM
public static final CompressionType FASTEST_ALGORITHM
GZip extra flag value for fastest algorithm.
-
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
-
CompressionType
protected CompressionType(int value, String label, boolean valid)Constructor.- Parameters:
value- The compression type value.label- The name of the compression type.valid- If it is a valid compression type.
-
-
Method Detail
-
fromValue
public static CompressionType 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 type objet, valid if
nis one of the defined valid values.
-
-