coders
Class Decoder

java.lang.Object
  extended by coders.Decoder
Direct Known Subclasses:
ReversibleDecoder

public abstract class Decoder
extends java.lang.Object

Author:
Jonathan L Dautrich Jr.

Field Summary
protected  boolean decoded
          Indicates whether the decode operation has been executed.
protected  Bitmap encodedBitmap
           
protected  BitSequence payload
           
 
Constructor Summary
Decoder(Bitmap encodedBitmap)
          Initializes this decoder with the specified bitmap.
 
Method Summary
protected abstract  void decode()
          Decodes the current bitmap.
 Bitmap getEncodedBitmap()
          Returns the encoded bitmap being decoded by this decoder.
 BitSequence getPayload()
          Retrieves the payload from the original bitmap, running the decode operation first if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encodedBitmap

protected Bitmap encodedBitmap

payload

protected BitSequence payload

decoded

protected boolean decoded
Indicates whether the decode operation has been executed. If it has, the restored bitmap and the payload will be available for retrieval, and decode may not be executed again.

Constructor Detail

Decoder

public Decoder(Bitmap encodedBitmap)
Initializes this decoder with the specified bitmap. The encodedBitmap should not be modified by the Decoder.

Parameters:
encodedBitmap -
Method Detail

decode

protected abstract void decode()
Decodes the current bitmap. Should execute only if it has not already been called.


getEncodedBitmap

public Bitmap getEncodedBitmap()
Returns the encoded bitmap being decoded by this decoder.

Returns:

getPayload

public BitSequence getPayload()
Retrieves the payload from the original bitmap, running the decode operation first if necessary.

Returns:
the payload