Package java.util.zip
Class CRC32
- java.lang.Object
-
- java.util.zip.CRC32
-
-
Constructor Summary
Constructors Constructor Description CRC32()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetValue()Returns the CRC32 checksum for all input received.voidreset()Resets the CRC32 checksum to it initial state.voidupdate(byte[] buf)Updates this checksum with the bytes contained in bufferbuf.voidupdate(byte[] buf, int offset, int byteCount)Update thisCRC32checksum with the contents ofbuf, starting fromoffsetand readingbyteCountbytes of data.voidupdate(int val)Updates this checksum with the byte value provided as integer.
-
-
-
Method Detail
-
getValue
public long getValue()
Returns the CRC32 checksum for all input received.
-
reset
public void reset()
Resets the CRC32 checksum to it initial state.
-
update
public void update(int val)
Updates this checksum with the byte value provided as integer.
-
update
public void update(byte[] buf)
Updates this checksum with the bytes contained in bufferbuf.- Parameters:
buf- the buffer holding the data to update the checksum with.
-
update
public void update(byte[] buf, int offset, int byteCount)Update thisCRC32checksum with the contents ofbuf, starting fromoffsetand readingbyteCountbytes of data.
-
-