Class Overview
A class that can be used to compute the Adler-32 checksum of a data
stream. An Adler-32 checksum is almost as reliable as a CRC-32 but
can be computed much faster.
Summary
Public Constructors |
|
Adler32()
Creates a new Adler32 object.
|
Public Methods |
long
|
getValue()
Returns checksum value.
|
void
|
reset()
Resets checksum to initial value.
|
void
|
update(byte[] b, int off, int len)
Updates checksum with specified array of bytes.
|
void
|
update(int b)
Updates checksum with specified byte.
|
void
|
update(byte[] b)
Updates checksum with specified array of bytes.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
java.util.zip.Checksum
abstract
long
|
getValue()
Returns the current checksum value.
|
abstract
void
|
reset()
Resets the checksum to its initial value.
|
abstract
void
|
update(byte[] b, int off, int len)
Updates the current checksum with the specified array of bytes.
|
abstract
void
|
update(int b)
Updates the current checksum with the specified byte.
|
|
Public Constructors
public
Adler32
()
Creates a new Adler32 object.
Public Methods
public
long
getValue
()
Returns
- the current checksum value
public
void
reset
()
Resets checksum to initial value.
public
void
update
(byte[] b, int off, int len)
Updates checksum with specified array of bytes.
Parameters
b
| the byte array to update the checksum with |
off
| the start offset of the data |
len
| the number of bytes to use for the update
|
public
void
update
(int b)
Updates checksum with specified byte.
public
void
update
(byte[] b)
Updates checksum with specified array of bytes.