Class Overview
The CRC32 class is used to compute a CRC32 checksum from data provided as
input value.
Summary
| Public Constructors |
|---|
|
|
CRC32()
|
| Public Methods |
|---|
|
long
|
getValue()
Returns the CRC32 checksum for all input received.
|
|
void
|
reset()
Resets the CRC32 checksum to it initial state.
|
|
void
|
update(byte[] buf, int off, int nbytes)
Updates this checksum with n bytes of data obtained from buffer buf, starting at offset off.
|
|
void
|
update(int val)
Updates this checksum with the byte value provided as integer.
|
|
void
|
update(byte[] buf)
Updates this checksum with the bytes contained in buffer buf.
|
|
[Expand]
Inherited Methods |
|---|
From class java.lang.Object
|
Object
|
clone()
Creates and returns a copy of this Object.
| |
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
| |
void
|
finalize()
Called before the object's memory is reclaimed by the VM.
| |
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
| |
int
|
hashCode()
Returns an integer hash code for this object.
| |
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
| |
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
| |
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
| |
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
| |
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
| |
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
From interface java.util.zip.Checksum
|
abstract
long
|
getValue()
Returns the current calculated checksum value.
| |
abstract
void
|
reset()
Resets the checksum value applied before beginning calculations on a new
stream of data.
| |
abstract
void
|
update(byte[] buf, int off, int nbytes)
Updates the checksum with the given bytes.
| |
abstract
void
|
update(int val)
Updates the checksum value with the given byte.
|
|
Public Constructors
Public Methods
public
long
getValue
()
Returns the CRC32 checksum for all input received.
Returns
- The checksum for this instance.
public
void
reset
()
Resets the CRC32 checksum to it initial state.
public
void
update
(byte[] buf, int off, int nbytes)
Updates this checksum with n bytes of data obtained from buffer buf, starting at offset off.
Parameters
| buf
| the buffer to update the checksum. |
|---|
| off
| the offset in buf to obtain data from. |
|---|
| nbytes
| the number of bytes to read from buf.
|
|---|
public
void
update
(int val)
Updates this checksum with the byte value provided as integer.
Parameters
| val
| represents the byte to update the checksum.
|
|---|
public
void
update
(byte[] buf)
Updates this checksum with the bytes contained in buffer buf.
Parameters
| buf
| the buffer holding the data to update the checksum with.
|
|---|