Copyright 2011-01-06 Werner Randelshofer

ch.randelshofer.media.tiff
Class TIFFDirectory

java.lang.Object
  extended by ch.randelshofer.media.tiff.TIFFNode
      extended by ch.randelshofer.media.tiff.TIFFDirectory

public class TIFFDirectory
extends TIFFNode

A convenience class for working with TIFF IFD's.

Version:
1.0 2010-07-25 Created.
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from class ch.randelshofer.media.tiff.TIFFNode
ifdEntry
 
Constructor Summary
TIFFDirectory(TagSet tagSet, TIFFTag tag, int index)
          Creates a TIFFDirectory identified by the specified TIFFTag.
TIFFDirectory(TagSet tagSet, TIFFTag tag, int index, IFD ifd, IFDEntry parentEntry, java.util.ArrayList<FileSegment> fileSegments)
          Creates a TIFFDirectory identified by the specified TIFFTag and associated with the specified IFD and file segments.
TIFFDirectory(TagSet tagSet, TIFFTag tag, int index, IFD ifd, IFDEntry parentEntry, FileSegment fileSegment)
          Creates a TIFFDirectory identified by the specified TIFFTag and associated with the specified IFD and file segments.
TIFFDirectory(TagSet tagSet, TIFFTag tag, int index, long offset, long length, java.util.ArrayList<FileSegment> fileSegments)
           
TIFFDirectory(TagSet tagSet, TIFFTag tag, int index, long offset, long length, FileSegment fileSegment)
           
 
Method Summary
 int getCount()
           
 TIFFField getField(TIFFTag tag)
          Returns a TIFFField with the specified tag.
 java.util.ArrayList<FileSegment> getFileSegments()
          Returns the segments of the TIFF file inside its parent file.
 IFD getIFD()
          Returns the IFD from which this directory has been read.
 int getIndex()
           
 long getLength()
           
 java.lang.String getName()
           
 long getOffset()
           
 TagSet getTagSet()
          Returns the tag set used by this directory.
 
Methods inherited from class ch.randelshofer.media.tiff.TIFFNode
add, getChildAt, getChildCount, getChildren, getIFDEntry, getParent, getTag, getTagName, getTagNumber, preorderIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TIFFDirectory

public TIFFDirectory(TagSet tagSet,
                     TIFFTag tag,
                     int index)
Creates a TIFFDirectory identified by the specified TIFFTag.


TIFFDirectory

public TIFFDirectory(TagSet tagSet,
                     TIFFTag tag,
                     int index,
                     IFD ifd,
                     IFDEntry parentEntry,
                     java.util.ArrayList<FileSegment> fileSegments)
Creates a TIFFDirectory identified by the specified TIFFTag and associated with the specified IFD and file segments.


TIFFDirectory

public TIFFDirectory(TagSet tagSet,
                     TIFFTag tag,
                     int index,
                     IFD ifd,
                     IFDEntry parentEntry,
                     FileSegment fileSegment)
Creates a TIFFDirectory identified by the specified TIFFTag and associated with the specified IFD and file segments.


TIFFDirectory

public TIFFDirectory(TagSet tagSet,
                     TIFFTag tag,
                     int index,
                     long offset,
                     long length,
                     FileSegment fileSegment)

TIFFDirectory

public TIFFDirectory(TagSet tagSet,
                     TIFFTag tag,
                     int index,
                     long offset,
                     long length,
                     java.util.ArrayList<FileSegment> fileSegments)
Method Detail

getIFD

public IFD getIFD()
Returns the IFD from which this directory has been read.

Returns:
IFD or null.

getTagSet

public TagSet getTagSet()
Returns the tag set used by this directory.


getName

public java.lang.String getName()

getIndex

public int getIndex()

getCount

public int getCount()

getOffset

public long getOffset()

getLength

public long getLength()

getFileSegments

public java.util.ArrayList<FileSegment> getFileSegments()
Returns the segments of the TIFF file inside its parent file. In a JPEG JFIF stream, a TIFF file can be segmented over multiple APP markers.

Returns:
segment list or null.

getField

public TIFFField getField(TIFFTag tag)
Returns a TIFFField with the specified tag. If a child node with this tag exists.

Parameters:
tag -

Copyright 2011-01-06 Werner Randelshofer