org.libtiff.jai.codec
Class XTIFFFactory

java.lang.Object
  extended by org.libtiff.jai.codec.XTIFFFactory
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GeoTIFFFactory

public class XTIFFFactory
extends java.lang.Object
implements java.io.Serializable

A class representing the factory for constructing a XTIFFDirectory, and the corresponding XTIFFFields. If you are creating extensions to those classes, extend this class as well. See the GeoTIFF package for an example of how to do this.

See Also:
org.libtiff.jai.TIFFDescriptor, XTIFFField, XTIFFDirectory, Serialized Form

Constructor Summary
XTIFFFactory()
          Default constructor
 
Method Summary
 XTIFFDirectory createDirectory()
          Constructs an empty XTIFFDirectory for encoding
 XTIFFDirectory createDirectory(com.sun.media.jai.codec.SeekableStream stream, int directory)
          Constructs an XTIFFDirectoryFactory from a SeekableStream.
 XTIFFDirectory createDirectory(com.sun.media.jai.codec.SeekableStream stream, long ifd_offset)
          Constructs a XTIFFDirectory by reading a SeekableStream.
 XTIFFField createField(int tag, int type, int count, java.lang.Object obj)
          Constructs an XTIFFField from values
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XTIFFFactory

public XTIFFFactory()
Default constructor

Method Detail

createDirectory

public XTIFFDirectory createDirectory(com.sun.media.jai.codec.SeekableStream stream,
                                      int directory)
                               throws java.io.IOException
Constructs an XTIFFDirectoryFactory from a SeekableStream. The directory parameter specifies which directory to read from the linked list present in the stream; directory 0 is normally read but it is possible to store multiple images in a single TIFF file by maintaing multiple directories.

Parameters:
stream - a SeekableStream to read from.
directory - the index of the directory to read.
Throws:
java.io.IOException

createDirectory

public XTIFFDirectory createDirectory(com.sun.media.jai.codec.SeekableStream stream,
                                      long ifd_offset)
                               throws java.io.IOException
Constructs a XTIFFDirectory by reading a SeekableStream. The ifd_offset parameter specifies the stream offset from which to begin reading; this mechanism is sometimes used to store private IFDs within a TIFF file that are not part of the normal sequence of IFDs.

Parameters:
stream - a SeekableStream to read from.
ifd_offset - the long byte offset of the directory.
Throws:
java.io.IOException

createDirectory

public XTIFFDirectory createDirectory()
Constructs an empty XTIFFDirectory for encoding


createField

public XTIFFField createField(int tag,
                              int type,
                              int count,
                              java.lang.Object obj)
Constructs an XTIFFField from values

Parameters:
tag - the TIFF tag listed in XTIFF
type - the TIFF field type listed in XTIFFField
count - the number of values in array obj
obj - the array of values
See Also:
XTIFFField