it.tidalwave.imageio.decoder
Class LosslessJPEGDecoder

java.lang.Object
  extended by it.tidalwave.imageio.decoder.LosslessJPEGDecoder

public class LosslessJPEGDecoder
extends java.lang.Object

This class implements a 16-bit Lossless JPEG decoder. This kind of encoding is widely used by some RAW formats which include blocks of encoded data.

Version:
CVS $Id: LosslessJPEGDecoder.java,v 1.2 2006/02/08 19:50:51 fabriziogiudici Exp $
Author:
fritz

Constructor Summary
LosslessJPEGDecoder()
          Creates an empty decoder.
 
Method Summary
 short[] loadRow(RAWImageInputStream iis)
          Loads and decodes another row of data from this encoder.
 void reset(javax.imageio.stream.ImageInputStream iis)
          Links the decoder to a given input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LosslessJPEGDecoder

public LosslessJPEGDecoder()
Creates an empty decoder. Prior using, the decoder must be bound to an input stream by means of the reset(ImageInputStream) method. The same instance can be reused more than once by resetting it multiple times.

Method Detail

reset

public void reset(javax.imageio.stream.ImageInputStream iis)
           throws java.io.IOException
Links the decoder to a given input stream. This method also parses the Lossless JPEG header.

Parameters:
iis - the input stream
Throws:
java.io.IOException - if an I/O error occurs

loadRow

public short[] loadRow(RAWImageInputStream iis)
                throws java.io.IOException
Loads and decodes another row of data from this encoder.

Parameters:
iis - the bit reader to read data from
Throws:
java.io.IOException - if an I/O error occurs