lt.monarch.image.tiff
Class TIFFEncoder

java.lang.Object
  extended by lt.monarch.image.AbstractEncoder
      extended by lt.monarch.image.tiff.TIFFEncoder
All Implemented Interfaces:
java.io.Serializable

public class TIFFEncoder
extends AbstractEncoder

TIFFEncoder create a TIFF file.

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class lt.monarch.image.AbstractEncoder
image
 
Constructor Summary
Constructor and Description
TIFFEncoder()
          Empty constructor for TIFFEncoder.
TIFFEncoder(TIFFType type)
          Constructor for TIFFEncoder with the TIFF file type.
 
Method Summary
Modifier and Type Method and Description
 void encode(java.awt.Image image, java.io.OutputStream outputStream)
          Encodes image to the output stream.
 java.lang.String getContentType()
          Returns content type string - 'tiff'
 void setTiffType(TIFFType type)
          Sets TIFF file type.
 
Methods inherited from class lt.monarch.image.AbstractEncoder
readObject, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TIFFEncoder

public TIFFEncoder()
Empty constructor for TIFFEncoder. Uses default TIFFType.RGB


TIFFEncoder

public TIFFEncoder(TIFFType type)
Constructor for TIFFEncoder with the TIFF file type.

Parameters:
type - TIFF file type
Method Detail

setTiffType

public void setTiffType(TIFFType type)
Sets TIFF file type. Is RGB or CMYK colors.

Parameters:
type - TIFF file type

getContentType

public java.lang.String getContentType()
Returns content type string - 'tiff'

Specified by:
getContentType in class AbstractEncoder
Returns:
content type string

encode

public void encode(java.awt.Image image,
                   java.io.OutputStream outputStream)
            throws java.io.IOException,
                   java.lang.InterruptedException
Encodes image to the output stream.

Specified by:
encode in class AbstractEncoder
Parameters:
image - image which must be encoded into TIFF format.
outputStream - TIFF encoded image output stream.
Throws:
java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
java.lang.InterruptedException