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 voidaddChild(Tag tag, IFD child)voidaddField(TiffField<?> tiffField)voidaddFields(java.util.Collection<TiffField<?>> tiffFields)IFDgetChild(Tag tag)java.util.Map<Tag,IFD>getChildren()intgetEndOffset()TiffField<?>getField(Tag tag)java.lang.StringgetFieldAsString(Tag tag)Return a String representation of the fieldjava.util.Collection<TiffField<?>>getFields()Get all the fields for this IFD from the internal map.intgetSize()intgetStartOffset()voidremoveAllFields()Remove all the entries from the IDF fields mapIFDremoveChild(Tag tag)TiffField<?>removeField(Tag tag)Remove a specific field associated with the given tagvoidsetNextIFDOffset(RandomAccessOutputStream os, int nextOffset)Set the next IFD offset pointerintwrite(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
-