|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.media.jai.codec.ImageCodec
jsky.image.fits.codec.FITSCodec
public final class FITSCodec
A subclass of ImageCodec that handles
the FITS image format.
| Constructor Summary | |
|---|---|
FITSCodec()
Constructs an instance of FITSCodec. |
|
| Method Summary | |
|---|---|
boolean |
canEncodeImage(java.awt.image.RenderedImage im,
com.sun.media.jai.codec.ImageEncodeParam param)
Returns true if the image is encodable by this codec. |
protected com.sun.media.jai.codec.ImageDecoder |
createImageDecoder(java.io.InputStream src,
com.sun.media.jai.codec.ImageDecodeParam param)
Instantiates a FITSDecoder to read from the
given InputStream. |
protected com.sun.media.jai.codec.ImageDecoder |
createImageDecoder(com.sun.media.jai.codec.SeekableStream src,
com.sun.media.jai.codec.ImageDecodeParam param)
Instantiates a FITSDecoder to read from the
given SeekableStream. |
protected com.sun.media.jai.codec.ImageEncoder |
createImageEncoder(java.io.OutputStream dst,
com.sun.media.jai.codec.ImageEncodeParam param)
Instantiates a FITSEncoder to write to the
given OutputStream. |
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 FITS format. |
boolean |
isFormatRecognized(byte[] header)
Returns true if the header bytes indicate FITS format. |
| Methods inherited from class com.sun.media.jai.codec.ImageCodec |
|---|
createComponentColorModel, createComponentColorModel, createGrayIndexColorModel, createImageDecoder, createImageDecoder, createImageDecoder, createImageDecoder, createImageEncoder, getCodec, getCodecs, getDecoderNames, getEncoderNames, isFormatRecognized, isIndicesForGrayscale, registerCodec, unregisterCodec |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FITSCodec()
FITSCodec.
| Method Detail |
|---|
public java.lang.String getFormatName()
getFormatName in class com.sun.media.jai.codec.ImageCodecpublic java.lang.Class getDecodeParamClass()
Object.class since no DecodeParam
object is required for decoding.
getDecodeParamClass in class com.sun.media.jai.codec.ImageCodecpublic java.lang.Class getEncodeParamClass()
null since no encoder exists.
getEncodeParamClass in class com.sun.media.jai.codec.ImageCodec
public boolean canEncodeImage(java.awt.image.RenderedImage im,
com.sun.media.jai.codec.ImageEncodeParam param)
canEncodeImage in class com.sun.media.jai.codec.ImageCodec
protected com.sun.media.jai.codec.ImageEncoder createImageEncoder(java.io.OutputStream dst,
com.sun.media.jai.codec.ImageEncodeParam param)
FITSEncoder to write to the
given OutputStream.
createImageEncoder in class com.sun.media.jai.codec.ImageCodecdst - the OutputStream to write to.param - an instance of FITSEncodeParam used to
control the encoding process, or null. A
ClassCastException will be thrown if
param is non-null but not an instance of
FITSEncodeParam.
protected com.sun.media.jai.codec.ImageDecoder createImageDecoder(java.io.InputStream src,
com.sun.media.jai.codec.ImageDecodeParam param)
FITSDecoder to read from the
given InputStream.
By overriding this method, FITSCodec 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 FITS decoder does not
require the ability to seek backwards in its input, this allows
for greater efficiency.
createImageDecoder in class com.sun.media.jai.codec.ImageCodecsrc - the InputStream to read from.param - an instance of ImageDecodeParam used to
control the decoding process, or null.
protected com.sun.media.jai.codec.ImageDecoder createImageDecoder(com.sun.media.jai.codec.SeekableStream src,
com.sun.media.jai.codec.ImageDecodeParam param)
FITSDecoder to read from the
given SeekableStream.
createImageDecoder in class com.sun.media.jai.codec.ImageCodecsrc - the SeekableStream to read from.param - an instance of ImageDecodeParam used to
control the decoding process, or null.public int getNumHeaderBytes()
getNumHeaderBytes in class com.sun.media.jai.codec.ImageCodecpublic boolean isFormatRecognized(byte[] header)
true if the header bytes indicate FITS format.
isFormatRecognized in class com.sun.media.jai.codec.ImageCodecheader - an array of bytes containing the initial bytes of the
input data.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||