Class AbstractFieldType
java.lang.Object
org.apache.commons.imaging.formats.tiff.fieldtypes.AbstractFieldType
- Direct Known Subclasses:
- FieldTypeAscii,- FieldTypeByte,- FieldTypeDouble,- FieldTypeFloat,- FieldTypeLong,- FieldTypeLong8,- FieldTypeRational,- FieldTypeShort
TIFF field types.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final List<AbstractFieldType> Unmodifiable List of all field types.static final FieldTypeAsciiASCII field type.static final List<AbstractFieldType> Unmodifiable List of ASCII, BYTE field types.static final List<AbstractFieldType> Unmodifiable List of ASCII, RATIONAL field types.static final FieldTypeByteByte field type.static final List<AbstractFieldType> Unmodifiable List of SHORT, BYTE field types.static final FieldTypeDoubleDouble field type.static final FieldTypeFloatFloat field type.static final FieldTypeLongIFD field type.static final FieldTypeLong8IFD8 field type.static final FieldTypeLongLong field type.static final List<AbstractFieldType> Unmodifiable List of LONG, IFD field types.static final List<AbstractFieldType> Unmodifiable List of SHORT, LONG field types.static final FieldTypeLong8Long8 field type.static final FieldTypeRationalRational field type.static final FieldTypeByteSByte field type.static final FieldTypeShortShort field type.static final List<AbstractFieldType> Unmodifiable List of SHORT, LONG field types.static final List<AbstractFieldType> Unmodifiable List of SHORT, LONG, RATIONAL field types.static final List<AbstractFieldType> Unmodifiable List of SHORT, RATIONAL field types.static final FieldTypeLongSLong field type.static final FieldTypeLong8SLong8 field type.static final FieldTypeRationalSRational field type.static final FieldTypeShortSShort field type.static final FieldTypeByteUndefined field type.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractFieldType(int type, String name, int elementSize) Constructs a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionstatic AbstractFieldTypegetFieldType(int type) Gets a known field type.getName()Gets the name.intgetSize()Gets the size.intgetType()Gets the type.abstract ObjectGets the value from a TIFF field.abstract byte[]Converts the given object to a byte array.
- 
Field Details- 
BYTEByte field type.
- 
ASCIIASCII field type.
- 
SHORTShort field type.
- 
LONGLong field type.
- 
RATIONALRational field type.
- 
SBYTESByte field type.
- 
UNDEFINEDUndefined field type.
- 
SSHORTSShort field type.
- 
SLONGSLong field type.
- 
SRATIONALSRational field type.
- 
FLOATFloat field type.
- 
DOUBLEDouble field type.
- 
IFDIFD field type.
- 
LONG8Long8 field type.
- 
SLONG8SLong8 field type.
- 
IFD8IFD8 field type.
- 
ANYUnmodifiable List of all field types.
- 
SHORT_OR_LONGUnmodifiable List of SHORT, LONG field types.
- 
SHORT_OR_RATIONALUnmodifiable List of SHORT, RATIONAL field types.
- 
SHORT_OR_LONG_OR_RATIONALUnmodifiable List of SHORT, LONG, RATIONAL field types.
- 
LONG_OR_SHORTUnmodifiable List of SHORT, LONG field types.
- 
BYTE_OR_SHORTUnmodifiable List of SHORT, BYTE field types.
- 
LONG_OR_IFDUnmodifiable List of LONG, IFD field types.
- 
ASCII_OR_RATIONALUnmodifiable List of ASCII, RATIONAL field types.
- 
ASCII_OR_BYTEUnmodifiable List of ASCII, BYTE field types.
 
- 
- 
Constructor Details- 
AbstractFieldTypeConstructs a new instance.- Parameters:
- type- the type.
- name- the name.
- elementSize- the element size.
 
 
- 
- 
Method Details- 
getFieldTypeGets a known field type.- Parameters:
- type- the type to find.
- Returns:
- the matching field type.
- Throws:
- ImagingException- thrown when not found.
 
- 
getNameGets the name.- Returns:
- the name.
 
- 
getSizeGets the size.- Returns:
- the size.
 
- 
getTypeGets the type.- Returns:
- the type.
 
- 
getValueGets the value from a TIFF field.- Parameters:
- entry- the TIFF field.
- Returns:
- the value.
 
- 
writeDataConverts 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.
 
 
-