Enum FileAttributeType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FileAttributeType>

    public enum FileAttributeType
    extends java.lang.Enum<FileAttributeType>
    Well known types of file attributes.

    Uncommon information about a file should be added to the FileAttributes collection as an UNKNOWN_ATTRIBUTE with a custom display name.

    When adding new attribute types to this enum, add them adjacent to other types of the same category. The enum ordinal controls display ordering.

    • Method Detail

      • values

        public static FileAttributeType[] 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 (FileAttributeType c : FileAttributeType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FileAttributeType valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getDisplayName

        public java.lang.String getDisplayName()
        Returns the display name of this attribute type.
        Returns:
        string display name
      • getValueType

        public java.lang.Class<?> getValueType()
        Returns the class the value should match.
        Returns:
        expected class of the value