Android
java.util.zip
public class

java.util.zip.CRC32

java.lang.Object
java.util.zip.CRC32 Checksum

The CRC32 class is used to compute a CRC32 Checksum from a set of data.

Summary

Public Constructors

            CRC32()

Public Methods

          long  getValue()
Returns the CRC32 Checksum for all input received.
          void  reset()
Returns the CRC32 checksum to it initial state.
          void  update(byte[] buf, int off, int nbytes)
Updates this Checksum with nbytes of data from buffer buf, starting at offset off.
          void  update(int val)
Updates this Checksum with value val
          void  update(byte[] buf)
Updates this Checksum with the bytes contained in buffer buf.
Methods inherited from class java.lang.Object
Methods inherited from interface java.util.zip.Checksum

Details

Public Constructors

public CRC32()

Public Methods

public long getValue()

Returns the CRC32 Checksum for all input received.

Returns

  • The checksum for this instance

public void reset()

Returns the CRC32 checksum to it initial state.

public void update(byte[] buf, int off, int nbytes)

Updates this Checksum with nbytes of data from buffer buf, starting at offset off.

Parameters

buf Buffer to update Checksum
off Offset in buf to obtain data from
nbytes Number of bytes to read from buf

public void update(int val)

Updates this Checksum with value val

public void update(byte[] buf)

Updates this Checksum with the bytes contained in buffer buf.

Parameters

buf Buffer to update Checksum
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48