Package org.libtiff.jai.codec
Class XTIFFFactory
- java.lang.Object
-
- org.libtiff.jai.codec.XTIFFFactory
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GeoTIFFFactory
public class XTIFFFactory extends Object implements 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:
XTIFFField
,XTIFFDirectory
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XTIFFFactory()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XTIFFDirectory
createDirectory()
Constructs an empty XTIFFDirectory for encodingXTIFFDirectory
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, Object obj)
Constructs an XTIFFField from values
-
-
-
Method Detail
-
createDirectory
public XTIFFDirectory createDirectory(com.sun.media.jai.codec.SeekableStream stream, int directory) throws 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:
IOException
-
createDirectory
public XTIFFDirectory createDirectory(com.sun.media.jai.codec.SeekableStream stream, long ifd_offset) throws 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:
IOException
-
createDirectory
public XTIFFDirectory createDirectory()
Constructs an empty XTIFFDirectory for encoding
-
createField
public XTIFFField createField(int tag, int type, int count, Object obj)
Constructs an XTIFFField from values- Parameters:
tag
- the TIFF tag listed in XTIFFtype
- the TIFF field type listed in XTIFFFieldcount
- the number of values in array objobj
- the array of values- See Also:
XTIFFField
-
-