Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.modama.jaiutil.codecs.GQE
Class GQECodec  view GQECodec download GQECodec.java

java.lang.Object
  extended byImageCodec
      extended byorg.modama.jaiutil.codecs.GQE.GQECodec

public final class GQECodec
extends ImageCodec

A subclass of ImageCodec that handles the GQE Beamline Fileformat


Constructor Summary
GQECodec()
          Constructs an instance of GQECodec.
 
Method Summary
 boolean canEncodeImage(java.awt.image.RenderedImage im, ImageEncodeParam param)
          Returns true if the image is encodable by this codec.
protected  ImageDecoder createImageDecoder(java.io.InputStream src, ImageDecodeParam param)
          Instantiates a GQEImageDecoder to read from the given InputStream.
protected  ImageEncoder createImageEncoder(java.io.OutputStream dst, ImageEncodeParam param)
          NOT IMPLEMENTED YET
 java.lang.Class getDecodeParamClass()
          Returns Object.class since no DecodeParam object is required for decoding.
 java.lang.Class getEncodeParamClass()
          Returns null since no encoder exists.
 java.lang.String getFormatName()
          Returns the name of the format handled by this codec.
 int getNumHeaderBytes()
          Returns the number of bytes from the beginning of the data required to recognize it as being in PNM format.
 boolean isFormatRecognized(byte[] header)
          Returns true if the header bytes indicate GQE format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GQECodec

public GQECodec()
Constructs an instance of GQECodec.

Method Detail

getFormatName

public java.lang.String getFormatName()
Returns the name of the format handled by this codec.


getEncodeParamClass

public java.lang.Class getEncodeParamClass()
Returns null since no encoder exists.


getDecodeParamClass

public java.lang.Class getDecodeParamClass()
Returns Object.class since no DecodeParam object is required for decoding.


canEncodeImage

public boolean canEncodeImage(java.awt.image.RenderedImage im,
                              ImageEncodeParam param)
Returns true if the image is encodable by this codec.


createImageEncoder

protected ImageEncoder createImageEncoder(java.io.OutputStream dst,
                                          ImageEncodeParam param)
NOT IMPLEMENTED YET


createImageDecoder

protected ImageDecoder createImageDecoder(java.io.InputStream src,
                                          ImageDecodeParam param)
Instantiates a GQEImageDecoder to read from the given InputStream.

By overriding this method, GQECodec is able to ensure that a ForwardSeekableStream is used to wrap the source InputStream instead of the a general (and more expensive) subclass of SeekableStream. Since the GQE decoder does not require the ability to seek backwards in its input, this allows for greater efficiency.


getNumHeaderBytes

public int getNumHeaderBytes()
Returns the number of bytes from the beginning of the data required to recognize it as being in PNM format.


isFormatRecognized

public boolean isFormatRecognized(byte[] header)
Returns true if the header bytes indicate GQE format.