Package edu.harvard.hul.ois.jhove
Enum SignatureType
- java.lang.Object
-
- java.lang.Enum<SignatureType>
-
- edu.harvard.hul.ois.jhove.SignatureType
-
- All Implemented Interfaces:
Serializable,Comparable<SignatureType>
public enum SignatureType extends Enum<SignatureType>
This class defines enumerated types for a Signature in a module. Applications will not create or modify SignatureTypes, but will use one of the predefined SignatureType instances EXTENSION, FILETYPE, or MAGIC.- See Also:
Signature
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EXTENSIONSignature type for a file extension, i.e., a sequence of characters following a period character in a file name.FILETYPESignature type for a Macintosh OS file type.MAGICSignature type for a "magic number" stored in the file.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()static SignatureTypevalueOf(String name)Returns the enum constant of this type with the specified name.static SignatureType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXTENSION
public static final SignatureType EXTENSION
Signature type for a file extension, i.e., a sequence of characters following a period character in a file name.
-
FILETYPE
public static final SignatureType FILETYPE
Signature type for a Macintosh OS file type. This applies only to Mac OS files, and is always a four-character code.
-
MAGIC
public static final SignatureType MAGIC
Signature type for a "magic number" stored in the file.
-
-
Field Detail
-
name
public final String name
A String name for the type, used for reporting.
-
-
Method Detail
-
values
public static SignatureType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SignatureType c : SignatureType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SignatureType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
toString
public String toString()
- Overrides:
toStringin classEnum<SignatureType>
-
-