Package pixy.image.tiff
Class IFD
java.lang.Object
pixy.image.tiff.IFD
public final class IFD
extends java.lang.Object
Image File Directory
- Version:
- 1.0 01/04/2013
- Author:
- Wen Yu, yuwen_66@yahoo.com
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
addChild(Tag tag, IFD child)
void
addField(TiffField<?> tiffField)
void
addFields(java.util.Collection<TiffField<?>> tiffFields)
IFD
getChild(Tag tag)
java.util.Map<Tag,IFD>
getChildren()
int
getEndOffset()
TiffField<?>
getField(Tag tag)
java.lang.String
getFieldAsString(Tag tag)
Return a String representation of the fieldjava.util.Collection<TiffField<?>>
getFields()
Get all the fields for this IFD from the internal map.int
getSize()
int
getStartOffset()
void
removeAllFields()
Remove all the entries from the IDF fields mapIFD
removeChild(Tag tag)
TiffField<?>
removeField(Tag tag)
Remove a specific field associated with the given tagvoid
setNextIFDOffset(RandomAccessOutputStream os, int nextOffset)
Set the next IFD offset pointerint
write(RandomAccessOutputStream os, int offset)
Write this IFD and all the children, if any, to the output stream
-
Constructor Details
-
Method Details
-
addChild
-
addField
-
addFields
-
getChild
-
getChildren
-
getEndOffset
public int getEndOffset() -
getField
-
getFieldAsString
Return a String representation of the field- Parameters:
tag
- Tag for the field- Returns:
- a String representation of the field
-
getFields
Get all the fields for this IFD from the internal map. -
getSize
public int getSize() -
getStartOffset
public int getStartOffset() -
removeAllFields
public void removeAllFields()Remove all the entries from the IDF fields map -
removeChild
-
removeField
Remove a specific field associated with the given tag -
setNextIFDOffset
public void setNextIFDOffset(RandomAccessOutputStream os, int nextOffset) throws java.io.IOExceptionSet the next IFD offset pointerNote: This should ONLY be called after the current IFD has been written to the RandomAccessOutputStream
- Parameters:
os
- RandomAccessOutputStreamnextOffset
- next IFD offset value- Throws:
java.io.IOException
-
write
Write this IFD and all the children, if any, to the output stream- Parameters:
os
- RandomAccessOutputStreamoffset
- stream offset to write this IFD- Throws:
java.io.IOException
-