|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.bolet.jgz.CRC
public final class CRC
This class contains helper method for computing CRC checksums
over some data. The CRC has a 32-bit state, which begins with the
"all-ones" value (see the START constant). The CRC
result, once all data bytes have been processed, is the bitwise
inverse of the state.
| Field Summary | |
|---|---|
static int |
START
The initial value for a CRC (this is the "all-one" constant). |
| Method Summary | |
|---|---|
static int |
updateCRC(int crc,
byte[] buf)
Update a CRC value with several data bytes |
static int |
updateCRC(int crc,
byte[] buf,
int off,
int len)
Update a CRC value with several data bytes |
static int |
updateCRC(int crc,
int v)
Update a CRC value with a data byte. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int START
| Method Detail |
|---|
public static int updateCRC(int crc,
int v)
crc - the CRC valuev - the data byte (between 0 and 255)
public static int updateCRC(int crc,
byte[] buf)
crc - the CRC valuebuf - the data bytes
public static int updateCRC(int crc,
byte[] buf,
int off,
int len)
crc - the CRC valuebuf - the data bytesoff - the data bytes offsetlen - the data bytes length (in bytes)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||