Enum IfdType

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

    public enum IfdType
    extends java.lang.Enum<IfdType>
    This enum corresponds to the types of data present in an IFD, as defined in Section 4.6.2 of the Exif Specification version 2.3.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ASCII
      An 8-bit value containing a single 7-bit ASCII character.
      BYTE
      An 8-bit unsigned integer value.
      LONG
      A 32-bit unsigned integer value.
      RATIONAL
      Two LONG values, where the first LONG is the numerator, while the second LONG is the denominator.
      SHORT
      A 16-bit unsigned integer value.
      SLONG
      A 32-bit signed integer value using 2's complement.
      SRATIONAL
      Two SLONG values, where the first SLONG is the numerator, while the second SLONG is the denominator.
      UNDEFINED
      An 8-bit value which can be value as defined elsewhere.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int size  
      private int value  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private IfdType​(int value, int size)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int size()
      Returns the size in bytes for this IFD type.
      java.lang.String toString()
      Returns a textual String reprensentation of this enum.
      static IfdType typeOf​(int value)
      Returns the IfdType corresponding to the given IFD type value.
      int value()
      Returns the IFD type as a type value.
      static IfdType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static IfdType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • BYTE

        public static final IfdType BYTE
        An 8-bit unsigned integer value.
      • ASCII

        public static final IfdType ASCII
        An 8-bit value containing a single 7-bit ASCII character. The final byte is NULL-terminated.
      • SHORT

        public static final IfdType SHORT
        A 16-bit unsigned integer value.
      • LONG

        public static final IfdType LONG
        A 32-bit unsigned integer value.
      • RATIONAL

        public static final IfdType RATIONAL
        Two LONG values, where the first LONG is the numerator, while the second LONG is the denominator.
      • UNDEFINED

        public static final IfdType UNDEFINED
        An 8-bit value which can be value as defined elsewhere.
      • SLONG

        public static final IfdType SLONG
        A 32-bit signed integer value using 2's complement.
      • SRATIONAL

        public static final IfdType SRATIONAL
        Two SLONG values, where the first SLONG is the numerator, while the second SLONG is the denominator.
    • Field Detail

      • value

        private int value
      • size

        private int size
    • Constructor Detail

      • IfdType

        private IfdType​(int value,
                        int size)
    • Method Detail

      • values

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

        public static IfdType 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
      • size

        public int size()
        Returns the size in bytes for this IFD type.
        Returns:
        Size in bytes for this IFD type.
      • value

        public int value()
        Returns the IFD type as a type value.
        Returns:
        IFD type as a type value.
      • typeOf

        public static IfdType typeOf​(int value)
        Returns the IfdType corresponding to the given IFD type value.
        Parameters:
        value - The IFD type value.
        Returns:
        IfdType corresponding to the IDF type value. Return null if the given value does not correspond to a valid IfdType.
      • toString

        public java.lang.String toString()
        Returns a textual String reprensentation of this enum.
        Overrides:
        toString in class java.lang.Enum<IfdType>
        Returns:
        A textual representation of this enum.