Enum 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 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 name
        NullPointerException - if the argument is null