Class AbstractFieldType

    • Field Detail

      • SBYTE

        public static final FieldTypeByte SBYTE
        SByte field type.
      • UNDEFINED

        public static final FieldTypeByte UNDEFINED
        Undefined field type.
      • SSHORT

        public static final FieldTypeShort SSHORT
        SShort field type.
      • SLONG

        public static final FieldTypeLong SLONG
        SLong field type.
      • SLONG8

        public static final FieldTypeLong8 SLONG8
        SLong8 field type.
      • ANY

        public static final java.util.List<AbstractFieldType> ANY
        Unmodifiable List of all field types.
      • SHORT_OR_LONG

        public static final java.util.List<AbstractFieldType> SHORT_OR_LONG
        Unmodifiable List of SHORT, LONG field types.
      • SHORT_OR_RATIONAL

        public static final java.util.List<AbstractFieldType> SHORT_OR_RATIONAL
        Unmodifiable List of SHORT, RATIONAL field types.
      • SHORT_OR_LONG_OR_RATIONAL

        public static final java.util.List<AbstractFieldType> SHORT_OR_LONG_OR_RATIONAL
        Unmodifiable List of SHORT, LONG, RATIONAL field types.
      • LONG_OR_SHORT

        public static final java.util.List<AbstractFieldType> LONG_OR_SHORT
        Unmodifiable List of SHORT, LONG field types.
      • BYTE_OR_SHORT

        public static final java.util.List<AbstractFieldType> BYTE_OR_SHORT
        Unmodifiable List of SHORT, BYTE field types.
      • LONG_OR_IFD

        public static final java.util.List<AbstractFieldType> LONG_OR_IFD
        Unmodifiable List of LONG, IFD field types.
      • ASCII_OR_RATIONAL

        public static final java.util.List<AbstractFieldType> ASCII_OR_RATIONAL
        Unmodifiable List of ASCII, RATIONAL field types.
      • ASCII_OR_BYTE

        public static final java.util.List<AbstractFieldType> ASCII_OR_BYTE
        Unmodifiable List of ASCII, BYTE field types.
      • type

        private final int type
      • name

        private final java.lang.String name
      • elementSize

        private final int elementSize
    • Constructor Detail

      • AbstractFieldType

        protected AbstractFieldType​(int type,
                                    java.lang.String name,
                                    int elementSize)
        Constructs a new instance.
        Parameters:
        type - the type.
        name - the name.
        elementSize - the element size.
    • Method Detail

      • getFieldType

        public static AbstractFieldType getFieldType​(int type)
                                              throws ImagingException
        Gets a known field type.
        Parameters:
        type - the type to find.
        Returns:
        the matching field type.
        Throws:
        ImagingException - thrown when not found.
      • getName

        public java.lang.String getName()
        Gets the name.
        Returns:
        the name.
      • getSize

        public int getSize()
        Gets the size.
        Returns:
        the size.
      • getType

        public int getType()
        Gets the type.
        Returns:
        the type.
      • getValue

        public abstract java.lang.Object getValue​(TiffField entry)
        Gets the value from a TIFF field.
        Parameters:
        entry - the TIFF field.
        Returns:
        the value.
      • writeData

        public abstract byte[] writeData​(java.lang.Object obj,
                                         java.nio.ByteOrder byteOrder)
                                  throws ImagingException
        Converts the given object to a byte array.
        Parameters:
        obj - input.
        byteOrder - output byte order; not used by all subclasses.
        Returns:
        a byte array.
        Throws:
        ImagingException - Thrown on a bad input.