Class CompressionType
java.lang.Object
edu.harvard.hul.ois.jhove.module.gzip.CompressionType
Enumerated type for GZip supported compression types (extra flags
in GZip header).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CompressionTypeGZip extra flag value for fastest algorithm.final StringThe value description.static final CompressionTypeGZip extra flag value for maximum compression.final booleanWhether the value is valid.final intThe integer value for the enum instance. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompressionType(int value, String label, boolean valid) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompressionTypefromValue(int n) Returns the enumerated value object corresponding to the specified integer value.
-
Field Details
-
MAXIMUM_COMPRESSION
GZip extra flag value for maximum compression. -
FASTEST_ALGORITHM
GZip extra flag value for fastest algorithm. -
value
public final int valueThe integer value for the enum instance. -
label
The value description. -
valid
public final boolean validWhether the value is valid.
-
-
Constructor Details
-
CompressionType
Constructor.- Parameters:
value- The compression type value.label- The name of the compression type.valid- If it is a valid compression type.
-
-
Method Details
-
fromValue
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.
-