javaFlacEncoder
Class CRC16

java.lang.Object
  extended by javaFlacEncoder.CRC16

public class CRC16
extends java.lang.Object

Class to calculate a CRC16 checksum.

Author:
Preston Lacey

Field Summary
static int DEBUG_LEV
          For Debugging: Higher level equals more debug statements
protected  int workingCRC
          working checksum stored between calls to update(..)
 
Constructor Summary
CRC16()
          Constructor.
 
Method Summary
 short checksum()
           
 void reset()
          Resets stored data, preparing object for a new checksum.
 int update(byte input)
           
 int update(byte[] input, int start, int stop)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_LEV

public static int DEBUG_LEV
For Debugging: Higher level equals more debug statements


workingCRC

protected int workingCRC
working checksum stored between calls to update(..)

Constructor Detail

CRC16

public CRC16()
Constructor. Creates a CRC16 object that is ready to be used. Next step would be to call update(...) with appropriate data.

Method Detail

reset

public void reset()
Resets stored data, preparing object for a new checksum.


checksum

public short checksum()

update

public int update(byte input)

update

public int update(byte[] input,
                  int start,
                  int stop)