|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bolet.jgz.Adler32
public final class Adler32
This class can be used to compute Adler-32 checksums (specified
in RFC 1950 and used in zlib
streams).
Constructor Summary | |
---|---|
Adler32()
Create the checksum engine with the standard initial state. |
Method Summary | |
---|---|
int |
getSum()
Get the current checksum value. |
void |
init()
Reset the engine to the standard initial state. |
void |
init(int val)
Set the current checksum value. |
void |
update(byte[] buf)
Update the cheksum with the provided input bytes. |
void |
update(byte[] buf,
int off,
int len)
Update the cheksum with the provided input bytes. |
void |
update(int v)
Update the cheksum with the provided input byte. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Adler32()
Method Detail |
---|
public void init()
public void init(int val)
val
- the new checksum statepublic void update(int v)
v
- the input byte (between 0 and 255)public void update(byte[] buf)
buf
- the data bufferpublic void update(byte[] buf, int off, int len)
buf
- the data bufferoff
- the data offsetlen
- the data length (in bytes)public int getSum()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |