public final class IFD
extends java.lang.Object
Modifier and Type | Method and 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 field
|
java.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 map
|
IFD |
removeChild(Tag tag) |
TiffField<?> |
removeField(Tag tag)
Remove a specific field associated with the given tag
|
void |
setNextIFDOffset(RandomAccessOutputStream os,
int nextOffset)
Set the next IFD offset pointer
|
int |
write(RandomAccessOutputStream os,
int offset)
Write this IFD and all the children, if any, to the output stream
|
public IFD()
public IFD(IFD other)
public void addField(TiffField<?> tiffField)
public void addFields(java.util.Collection<TiffField<?>> tiffFields)
public int getEndOffset()
public java.lang.String getFieldAsString(Tag tag)
tag
- Tag for the fieldpublic java.util.Collection<TiffField<?>> getFields()
public int getSize()
public int getStartOffset()
public void removeAllFields()
public TiffField<?> removeField(Tag tag)
public void setNextIFDOffset(RandomAccessOutputStream os, int nextOffset) throws java.io.IOException
Note: This should ONLY be called after the current IFD has been written to the RandomAccessOutputStream
os
- RandomAccessOutputStreamnextOffset
- next IFD offset valuejava.io.IOException
public int write(RandomAccessOutputStream os, int offset) throws java.io.IOException
os
- RandomAccessOutputStreamoffset
- stream offset to write this IFDjava.io.IOException