sam.io
Class ChecksumTracker

java.lang.Object
  |
  +--sam.io.Tracker
        |
        +--sam.io.ChecksumTracker

public class ChecksumTracker
extends Tracker

Tracker that adds a CRC32 checksum trace to processed data. This allows a per-block consistency checking during extraction.


Field Summary
 
Fields inherited from class sam.io.Tracker
description, name
 
Constructor Summary
ChecksumTracker()
           
 
Method Summary
protected  void load(java.io.DataInputStream input)
          Checks the computed checksum and loads that of the next one.
protected  void save(java.io.DataOutputStream output)
          Saves this tracker state
 void update(byte[] data, int begin, int length)
          Updates this tracker state with specified plain data Warning This method is not supposed to alter the supplied data although for efficiency reason it is still not prevented from doing it.
 
Methods inherited from class sam.io.Tracker
get, getTrackers, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChecksumTracker

public ChecksumTracker()
Method Detail

update

public void update(byte[] data,
                   int begin,
                   int length)
Description copied from class: Tracker
Updates this tracker state with specified plain data Warning This method is not supposed to alter the supplied data although for efficiency reason it is still not prevented from doing it.

Specified by:
update in class Tracker
Parameters:
data - the plain data to be considered
begin - the beginning of the portion of data considered
length - the length of the portion of data considered

load

protected void load(java.io.DataInputStream input)
             throws java.io.IOException
Checks the computed checksum and loads that of the next one.

Specified by:
load in class Tracker
java.io.IOException

save

protected void save(java.io.DataOutputStream output)
             throws java.io.IOException
Description copied from class: Tracker
Saves this tracker state

Specified by:
save in class Tracker
java.io.IOException