|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.eyebolt.iplib.CRCCalc
Encapsulate operations to calculate CRC on some object.
Field Summary | |
(package private) static short |
CRC_NORMAL
|
(package private) static int |
CRC16
|
(package private) static short[] |
crctab
|
(package private) int |
crctype
|
(package private) boolean |
firsttime
|
(package private) int |
shortCount
keep track of # of shorts; add an extra before a long |
(package private) short |
value
|
Constructor Summary | |
CRCCalc()
Constructs a CRCCalc |
Method Summary | |
(package private) short |
crchware(short data,
int genpoly,
short accum)
Description of the Method |
(package private) short |
crcrevhware(short data,
int genpoly,
short accum)
Description of the Method |
(package private) void |
crcrevupdate(short data)
Description of the Method |
(package private) void |
crcupdate(short data)
Description of the Method |
long |
getValue()
Gets the Value attribute of the CRCCalc object |
(package private) short[] |
mk_crctbl(int poly)
Description of the Method |
void |
update(byte[] bytes)
Add some bytes to the CRC to be calculated |
void |
updateInteger(int val)
Add an integer value to the CRC to be calculated |
void |
updateShort(short s)
Add a short value to the CRC to be calculated |
Methods inherited from class java.lang.Object |
|
Field Detail |
int crctype
short value
boolean firsttime
int shortCount
static final int CRC16
static final short CRC_NORMAL
static short[] crctab
Constructor Detail |
public CRCCalc()
Method Detail |
public long getValue()
public void updateInteger(int val)
val
- the int to addpublic void updateShort(short s)
s
- the short to addpublic void update(byte[] bytes)
bytes
- the bytes to addshort crcrevhware(short data, int genpoly, short accum)
data
- Description of Parametergenpoly
- Description of Parameteraccum
- Description of Parametershort crchware(short data, int genpoly, short accum)
data
- Description of Parametergenpoly
- Description of Parameteraccum
- Description of Parametershort[] mk_crctbl(int poly)
poly
- Description of Parametervoid crcupdate(short data)
data
- Description of Parametervoid crcrevupdate(short data)
data
- Description of Parameter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |