edu.harvard.hul.ois.jhove.module.jpeg
Class SpiffDir
java.lang.Object
edu.harvard.hul.ois.jhove.module.jpeg.SpiffDir
public class SpiffDir
- extends java.lang.Object
This class represents a SPIFF directory and the tags defined under
it. A SPIFF directory consists of one or more APP8 segments, and
may define ancillary images. It is always contained within the
primary image stream.
- Author:
- Gary McGath
Method Summary |
void |
appendThumbnailProps(java.util.List imageList)
Appends any thumbnail properties that have been collected to
the provided list. |
void |
readDirEntry(java.io.DataInputStream dstream,
int length)
Reads a directory entry, starting at the position after
the APP8 marker and length. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpiffDir
public SpiffDir(JpegModule module)
readDirEntry
public void readDirEntry(java.io.DataInputStream dstream,
int length)
throws java.io.IOException
- Reads a directory entry, starting at the position after
the APP8 marker and length. If the entry is for a thumbnail, create
a Property for that thumbnail and add it to the thumbnail
list. Other tags provide interesting information, some of
which should go into properties, but for the moment we
just handle the thumbnail and ignore other tags.
An APP8 segment which is in a SPIFF file, and isn't the
first APP8 segment (file header), is presumed to be a
directory entry. These directory entries are a little
inconvenient, because they can contain offsets to data in
what we otherwise handle as a stream format. The offsets
can be either to data within the block, or to faraway
indirect data blocks. For the present version, we ignore
offset data, which seems to be used only for the actual
image bits (e.g., TNDATA).
- Throws:
java.io.IOException
appendThumbnailProps
public void appendThumbnailProps(java.util.List imageList)
- Appends any thumbnail properties that have been collected to
the provided list.