home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
U.S. Robotics Connections 5
/
CONNECTIONS.iso
/
content
/
software
/
office
/
hotoffic
/
optional
/
java_upd.exe
/
classr.exe
/
sun
/
misc
/
CRC16.class
(
.txt
)
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Windows-1252 (detected)
Wrap
Java Class File
|
1997-05-08
|
523 b
|
26 lines
package sun.misc;
public class CRC16 {
public int value = 0;
public void update(byte var1) {
int var2 = var1;
for(int var4 = 7; var4 >= 0; --var4) {
var2 <<= 1;
int var3 = var2 >>> 8 & 1;
if ((this.value & 'ËÄÄ') != 0) {
this.value = (this.value << 1) + var3 ^ 4129;
} else {
this.value = (this.value << 1) + var3;
}
}
this.value &= 65535;
}
public void reset() {
this.value = 0;
}
}