public final class OC16ChecksumProducer extends Object
| Constructor and Description |
|---|
OC16ChecksumProducer()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte b)
Adds the specified 8-bit value to the checksum.
|
void |
add(byte a,
byte b)
Adds the specified 8-bit values to the checksum.
|
void |
add(int i)
Adds the specified 32-bit value to the checksum.
|
void |
add(long l)
Adds the specified 64-bit value to the checksum.
|
void |
add(short s)
Adds the specified 16-bit value to the checksum total.
|
short |
getChecksum()
Returns the current checksum value that has been computed for the object.
|
void |
reset()
Resets the object to a zero state.
|
public void add(byte b)
b - The 8-bit value to add to the checksum.public void add(byte a,
byte b)
a - The high order 8-bitsb - The low order 8-bitspublic void add(short s)
s - The 16-bit value to addpublic void add(int i)
i - The 32-bit value.public void add(long l)
l - The 64-bit value to addpublic void reset()
public short getChecksum()
Copyright © 2002–2023 The OpenNMS Group, Inc.. All rights reserved.