com.google.appengine.api.files
Class Crc32c

java.lang.Object
  extended by com.google.appengine.api.files.Crc32c
All Implemented Interfaces:
java.util.zip.Checksum

public final class Crc32c
extends java.lang.Object
implements java.util.zip.Checksum

This class generates a CRC32C checksum, defined by rfc3720 section B.4.


Constructor Summary
Crc32c()
           
 
Method Summary
 long getValue()
          Returns the value of the checksum.
 void reset()
          Resets the crc.
 void update(byte[] bArray, int off, int len)
          Updates the checksum with an array of bytes.
 void update(int b)
          Updates the checksum with a new byte.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Crc32c

public Crc32c()
Method Detail

update

public void update(int b)
Updates the checksum with a new byte.

Specified by:
update in interface java.util.zip.Checksum
Parameters:
b - the new byte.

update

public void update(byte[] bArray,
                   int off,
                   int len)
Updates the checksum with an array of bytes.

Specified by:
update in interface java.util.zip.Checksum
Parameters:
bArray - the array of bytes.
off - the offset into the array where the update should begin.
len - the length of data to examine.

getValue

public long getValue()
Returns the value of the checksum.

Specified by:
getValue in interface java.util.zip.Checksum
Returns:
the value of the checksum.

reset

public void reset()
Resets the crc.

Specified by:
reset in interface java.util.zip.Checksum