|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthu.netmind.util.FastCrc
public class FastCrc
This class implements the fast crc algorithm (that is, it takes whole bytes at once).
| Constructor Summary | |
|---|---|
FastCrc(int generator)
Construct, and initialize the fast crc algorithm with the given generator polynomial. |
|
| Method Summary | |
|---|---|
int |
crc(byte[] b)
Generate crc code. |
int |
crc(byte[] b,
int offset,
int length)
Generate crc code for given byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FastCrc(int generator)
generator - The generator polynomial.| Method Detail |
|---|
public int crc(byte[] b,
int offset,
int length)
b - The byte array.offset - The offset to start from.length - The length of data.public int crc(byte[] b)
crc(b,0,b.length).
b - The byte data.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||