|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opengts.util.FletcherChecksum
public class FletcherChecksum
This class calculates a Fletcher checksum
| Constructor Summary | |
|---|---|
FletcherChecksum()
Constructor |
|
FletcherChecksum(byte[] b)
Constructor |
|
| Method Summary | |
|---|---|
byte[] |
getChecksum()
Gets the current value of the checksum |
int |
getChecksumAsInt()
Returns the current value of the checksum as an integer |
int[] |
getValues()
Returns the current values of the checksum accumulator. |
boolean |
isValid()
Returns true if the current checksum is valid |
static void |
main(java.lang.String[] argv)
Command-line entry point (bug/testing purposes) |
void |
reset()
Resets the internal Fletcher checksum accumulator |
void |
runningChecksum(byte b)
Adds the specified byte to the current running checksum accumulator. |
void |
runningChecksum(byte[] b)
Adds the specified byte array to the current running checksum accumulator. |
void |
runningChecksum(java.lang.String s)
Adds the bytes from the specified String to the current running checksum accumulator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FletcherChecksum()
public FletcherChecksum(byte[] b)
b - The initial byte array| Method Detail |
|---|
public void reset()
public int[] getValues()
public boolean isValid()
public byte[] getChecksum()
public int getChecksumAsInt()
public void runningChecksum(byte b)
b - The byte to add to the current running checksum accumulator.public void runningChecksum(byte[] b)
b - The byte array to add to the current running checksum accumulator.public void runningChecksum(java.lang.String s)
s - The String to add to the current running checksum accumulator.public static void main(java.lang.String[] argv)
argv - The command-line arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||